for ($j=0; $j<$galinmain; $j++) { $r = mysql_fetch_array($result); // some other code here }
--------------or=-------------
$numerek = 0; while ($r = mysql_fetch_array($result)) { // code here $numerek++; if ($numerek == $galinmain) { break; } }
What are you trying to do?
load 100 entries from db table and list them.
Then it doesn't matter which one you use.
ok. it just looks to me that the while look takes a little bit longer.
thanks vincente