Questions about how many outputs each row can be output for a controlled image! Thanks

Source: Internet
Author: User
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;
?>




If ($ I % 3 = 0 & $ I> = 3){Echo"













& Name = "> Border =" 0 ">







";
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 ++;}...?>









Image

Title


------ Solution --------------------
Previous examples
$ Product_ SQL = "select * from product order by pub_time desc limit 4 ";

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.