Jump to content

while ... loop through more than once


jonniejoejonson

Recommended Posts

while ($row=mysql_fetch_array($sql_result)) {

print $row['name'];

}

 

If i want to go through the result set more than once, How can i do it?...

If you try and use the above code more than once it does not work...

The only way i can see is to turn the results into arrays, and then loop through the arrays... but there must be a better way... regards J.

Link to comment
https://forums.phpfreaks.com/topic/181606-while-loop-through-more-than-once/
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.