a simple
$stuff = mysql_query(\"SELECT * FROM users\"); while($s = mysql_fetch_array($stuff)){ # .... } while($r = mysql_fetch_array($stuff)){ # ... }
$stuff = mysql_query("SELECT * FROM users"); while($s = mysql_fetch_array($stuff)){ # .... } // add this line mysql_data_seek( $stuff, 0 ); while($r = mysql_fetch_array($stuff)){ # ... }
Should do the trick
Another way is of course to store your result in an array and reuse that