Aims:
for
-loop
the block can contain any kind of statement…including other loops
for (expr1; expr2; expr3)
{
zero, one or more statements
}
foreach
loops can contain other loops
for ( $i = 0; $i < 4; $i++ ) { for ( $j = 0; $j < 3; $j++ ) { echo "<p>i: {$i} j: {$j}</p>"; } }
mult.html
contains this form:
<form action="mult.php" method="get"> <input type="text" name="number" /> <input type="submit" /> </form>Write
mult.php
, which outputs
(as an HTML table) a set of
multiplication tables ('times tables')
for the number that
the user enters. E.g. if the user enters 12, then your output runs from
'1 times 1 is 1' up to '12 times 12 is 144'