Getting Folder Content

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

How you lay out your content is entirely dependent on how you use the modulus and where in the loop you do it.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

The problem is that the while repeats the for loop or the for loop repeats the while :S
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

Read through the code, and for each step, imagine the code processing (like a debugger would). This should shed some light on how things are going to render.
thiscatis
Forum Contributor
Posts: 434
Joined: Thu Jul 20, 2006 11:00 am

Post by thiscatis »

Ok, went trough the code.
If i put the FOR loop over the while it just loops the result image 80 times before going to the next.
if I put the for loop in the WHILE statement it just keeps on showing the same image...
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

You are using $row in your limit portion of your for loop, but it is never set to anything. And it looks like the brackets in that code don't match up. Is it throwing any errors?
Post Reply