A question about how many outputs each line of a controlled image can be asked! Thanks for querying a lot of images from the database. I want to display only four images per line and the image name under the picture, but the code below is always not working properly. (If the name is not displayed, I already know how to do it. because the text is to be displayed under the image, a TR is added, and the image cannot be controlled .) [code] I 'd like to ask you for a question about how many outputs each line controls an image! Thank you.
I have found a lot of images from the database. now I want to display only four images per line and the image name under the picture. but the code below is always not working properly. (If the name is not displayed, I already know how to do it. because the text is to be displayed under the image, a TR is added, and the image cannot be controlled .)
[Code]
While ($ photoRows = mysql_fetch_array ($ result2 )){
$ I = $ I + 1;
?>
| & Name = "> Border =" 0 "> |
|
|
|
|
| If ($ I % 3 = 0 & $ I> = 3){Echo"
|
";
Echo" ";
?>
[/Code]
------ Solution --------------------
Principle: loop cells. in cells, you can add a table with one column and two rows. sample code:
....$ I = 0;While (){If ($ I % 3 = 0 & $ I! = 0 ){ }?>
| $ I ++;}...?>
------ Solution --------------------
Previous examples
$ Product_ SQL = "select * from product order by pub_time desc limit 4 ";