|
Free
PHP Tutorials
|
![]() |
home |
Stay
at Home and Learn
|
|||||
PHP Tutorials |
||||||
|
A PHP "Times Table" Programme
In the previous part, you saw what a For Loop was. In this section, we'll write a times table programme to illustrate how for loops work. There's a script called timesTable.php amongst the files you downloaded (in the scripts folder). When loaded into the browser, it looks like this: There's a script called timesTable.php amongst the files you downloaded (in the scripts folder.). When loaded into the browser, it looks like this:
What we're going to do is to get the values from the textboxes and create a Times Table proramme. When the button is clicked, the output will be something like this:
In other words, when the button is clicked we'll print the Times Table to the page. You can have a different Times Table, depending on what values you enter in the textboxes. To make a start with the coding, move on to the next part. <-- Back One Page Move on to the Next Part --> |