Normally when you iterate through a mysql result you do something like this:
while ($row = mysql_fetch_assoc($result)) {
echo $row["some argument"];
}
How do you do this with a for loop? This would be helpful so I can iterate through a certain portion of my results. I’m looking for something like:
for($i = 5; $i < 10; $i++){
echo $row[$i]["some argument"];
}
Thanks!
EDIT 1
Just to clarify, I need to loop through a portion of the results, which may mean rows 5 to 10 for example.
Also my result is a portion of rows from a table, not a table in it’s entirety, so I would think that changing the my_sql query should not be a part of the answer.
I believe you could use the mysql_result() like this:
Edit Noticed that my PHP-syntax was a bit off, corrected now.