<?php
$i = 0;
$j = 0;
echo '<table width = "800" border ="2">';
while ($i<8)
{
echo '<tr>';
while ($j<8)
{
echo '<td>'.$i."&".$j.'</td>';
$j ;
}
echo '</tr>';
$i ;
}
echo '</table>';
?>
和
<?php
$i = 0;
echo '<table width = "800" border ="2">';
while ($i<8)
{
$j = 0;
echo '<tr>';
while ($j<8)
{
echo '<td>'.$i."&".$j.'</td>';
$j ;
}
echo '</tr>';
$i ;
}
echo '</table>';
?>
ringa_lee2017-07-13 13:11:20
The variable values defined in the loop are of course different from the values defined outside the loop