A php program has just been changed. thank you! & lt ;? Phpwhile & nbsp; (& nbsp; $ rs & nbsp; = & nbsp; mysql_fetch_array ($ result) & nbsp;) {& nbsp; & nbsp; $ arr [] = $ rs ;? & Gt; a modified PHP program. thank you!
While ($ rs = mysql_fetch_array ($ result )){
$ Arr [] = $ rs;
?>
For ($ I = 0; $ I <$ month; $ I ++)
{
Echo $ arr [$ I] ['Date'];
}
?>
}
?>
In this way, can I use for to display information of all the queried rows? Why so many ? Is it a bad idea? The original code was written by someone else. I just changed it. PHP MySQL
------ Solution --------------------
This is a nested loop. it is estimated that your logic is wrong. you should first save the data in the database in the array, and then output the data in a loop, but now you have repeated output.
------ Solution --------------------
Add at the beginning of your program
Error_reporting (E_ALL );
You can see what went wrong!