As an experienced programmer I recommend that new programmers do NOT use this function.
Use mqsql_fetch_array instead.
Using this function leads to code like:
<?php
$surname = $row[7];
?>
This is a dangerous coding practice and should be avoided.
Changing the original query can break existing code, often in subtle ways that leave 'sleeper' bugs in your system that take months to appear.
Using mysql_fetch_array allows you to write code like:
<?php
$surname = $data['surname'];
?>
This code will continue to run properly even columns are added to the originial query.
Also it is much easier to read and makes reading and modiying your code easier, reducing bugs.
Mark McIlroy