I want to have a list of links to skip to certain slides like 1 2 3 4 5
with a link on each one. I know how to do this with a for loop going through the table.
However, if i need to delete the row to get rid of a slide or create an active column and set it to 0, the list ends up looking like this 1 3 4 5.
(if i had made row two inactive)
Here is my current code:
Code: Select all
for ($i=1; $i<=$rowTotal; $i++){
$row = mysql_fetch_array($result);
if ($row["active"] == 1){
echo "<li><a href=\"?slide=" . $row["pkey"] . "\">" . $i . "</a></li>";
}
}Any ideas or better ways of doing this most welcome!!! please help!