Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.