<?php
function mul()
{
global $start;
print "<tr>";
for ($num=1; $num <= 10; $num++ )
{
$cell = $num * $start;
print "<td> " . $cell . " </td>";
}
print "</tr>";
}
$start = 0;
print "<table border=1 cellpadding=3>";
while ( $start <=10 )
{
mul();
$start++;
}
print "</table>";
?>
One new thing you may have noticed is "GLOBAL". Since the variable $start is not defined within the function, we use the tag "GLOBAL" to let it know that it needs to use the $start variable that we have defined outside of the function.

