search

Home  >  Q&A  >  body text

while workflow? ? Or do I need to determine where the variable is defined? ?

<?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>';

?>


speltyspelty2740 days ago1377

reply all(2)I'll reply

  • 依依惜别离

    依依惜别离2017-07-13 13:25:12

    Every cycle is the same, you just follow each cycle to see the data

    reply
    0
  • ringa_lee

    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

    reply
    0
  • Cancelreply