Regarding homework, please help me, otherwise I will be thinking about this issue even while eating and sleeping.
HUNT
HUNT 2017-07-29 09:06:48
0
3
1470

<?php
echo '<table width="800" border="1">';
for ($i = 0; $i < 100; $i ) {
if($i ==0){
if($i ==0){
echo '<tr>';
}else{
echo '<tr bgcolor "red">';
I can't understand why $i needs to be incremented by 1. When trying to remove increment if($i ==0), the list will lose its original order, but this is not the case at the end of </tr> in the while loop. In the case of adding 1, the strange thing is that 1 was not added at the end of the while loop. After adding 1, the original order of the list is also lost.
if(($i 1) ==0){
echo '</tr>';

}

}
echo '</table>';
?>

HUNT
HUNT

reply all(3)
ringa_lee

Seeing all these Chinese characters in capital letters makes me a little dizzy. I want to know if you have solved this problem now

树&刀布

Because </tr> is to be output for the tenth time, $i is initially 0, (10)%10==0; and $I==9 for the tenth time; so $i+1)%10==0

树&刀布

Because <td> is adaptive by default and automatically adjusts according to the field length. 100 is a three-digit number indicating the length of the <tr>. The solution can be to give <tr> a width, or to pad the field with zeros or spaces. , make all fields the same length

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template