Jump to content

While loop with limits and exceptions


pioneerx01

Recommended Posts

I am not sure if the subject line is absolutely accurate in regards to what I want to do, but here is what I am trying to accomplish:

 

In my table I have record (call it ID=1) with few column names of 'pictures' and 'exclude' amongst others. In this example value of pictures is '5'

If I call on ID 1, I want to echo out 5 rows each with different number, so the result is:

 

this is picture 1

this is picture 2

this is picture 3

this is picture 4

this is picture 5

 

Now if the 'exclude' has values of lets say '3, 4', I want to echo out all the 5 rows, but the ones that should have 3 and 4. So, the result should be:

 

this is picture 1

this is picture 2

this is picture 5

 

 

How do I do that? Thank you

Link to comment
https://forums.phpfreaks.com/topic/238609-while-loop-with-limits-and-exceptions/
Share on other sites

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.