Jump to content

[SOLVED] How would you do this...


mike12255

Recommended Posts

I have had a problem now for a while i tried playing around with the code and failed, i posted code on her and failed, so now im trying to ask how you would go about doing this and mabey i can get ideas.

 

Im sql'ing my database to get image locations and then i want to post X amount of pictures on a line and have it go down a line everytime the number X is reached.

 

Is that clear enough - if not ask questions :)

Link to comment
https://forums.phpfreaks.com/topic/151992-solved-how-would-you-do-this/
Share on other sites

it's a modulus operator.  It divides one thing by another and returns the remainder.  The idea is if you divide the counter by the columns and it returns a zero remainder, you've reached a column count divisible by 5, or in other words, the 5th column in the current row, so start a new row.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.