I was wondering how I could replace this loop: while ($row=mysql_fetch_array($res)) by an for loop.
I want to know, because on my website, I want to show the data on my website, but the first row needs a different layout as the rest.
So what I would like to have, is something like this:
$row[0]
for ($i = 1; $i <= mysql_num_rows($result); $i++) {
$row[$i]
}
I tried a bit of searching here, but couldnt find something that seemed logical to me: most examples I saw would execute a new sql query to the server, which isnt very good for the speed, is it?
Please let me know!
for
to have a counter – Damien Pirsy Oct 14 '11 at 14:59