I read somewhere (sorry I forgot where), that there is a way to associate an index number to rows fetched from an MySQL query result using a native PHP function (the person was not sure about the syntax so he didn't wrote it). For example:
The usual way:
$count = 1;
while($row = mysql_fetch_array($result, MYSQL_ASSOC)){
echo "<li> ". $count ."id: " . $row['id'] . " lon: " . $row['lon']. ", lat: ". $row['lat'].", ". $row['road']. " </li>";
$count++;
}
I know that thinking of this other way is not that important, but I'm just curious if there really is a function for that purpose.