Jump to content

Help with while loop idea


EchoFool

Recommended Posts

I have the idea of a while loop with a query which is also in a while loop.. so in essence a while loop within a while loop. Now obviously that is do-able but the first main query i need to select rows in batches of 3's via ID for example.

 

$Get the first 3

While($row = ($Get)){

$row['ID']

$Find info on $row['ID']

While($row2 = ($Find)){

// stuff here

}

 

Now what needs to be added is a while loop around that whole thing so the "$Get the first 3" will essentially do this:

 

 

Get first 3

Get 4 to 6

Get 7 to 9

etc

 

But could not figure out how I could do this..... any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/113830-help-with-while-loop-idea/
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.