>Whow, is that way of a loop really faster? I mean .. It looks as if the >accept same thing happens > - $upperlimit is set > - $i counter is set > - for every loop $i is set one higher > - Also for every loop the expression ($i<$upperlimit) is evaluated.
Not sure, but I just did a quick test - over one million iterations, it was 0.47 seconds faster. It's up you to decide whether that's going to affect you much. :) I'd stick with Chris' suggestion to minimize database access, since that's what will really nail you for busy sites. Scraping together milliseconds here and there is fine if you're really against the wall, but I imagine that the benefit could be more than offset for by comparing the value of your time as a developer to the cost of a slightly faster server. --------------------------------------------------------------------- michal migurski- contact info and pgp key: sf/ca http://mike.teczno.com/contact.html -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php