I dun quite understand how this program works.......
Please advice...
What is the output of this program?
<html>
<!-- test01.php -->
<body>
<?php
$x = 2;
for ($i = 1; $i <= 6; $i++)
{
if ($i % 2 == 1)
{
$x++;
}
print $i . 'x' . $i * $x . " ";
}
?>
</body>
</html>
*******
Answer:
1x3 2x6 3x12 4x16 5x25 6x30
Please advice...
Thanks,
Tony