hi,
some days ago i asked a question on this topic and even got an answer (thanx), however, i haven't been able to produce the result which i wanted.
the problem is simple:
you have a table of editorials which are refered to from the page as scanner.php?id=666 or whatever. now, every editorial should have a link to the previous one. the problem arises because administrators of the website can delete editorials. so, i just can't make up the id for the previous editorial as $id - 1, because the id might not exist (in this example case the prev id 665 might not exist).
can anyone help me with this problem? to read the last thread (albeit a short one), go to: i don't know much about arrays and loops (which, i'm assuming, are neede to solve this problem), so if you answer, please be as straightforward and examplifying (?) as possible. and please, i have looked in the manual for answers until my eyes hurt. thank you in advance, peeter p.s. i have also searched through this board-system with different queries, and as far as i know, nobody has brought up this problem before. p.
loop id(,name...etc) into array and give index to array
$index =0; while {
array[$index][0{ex. id}] = mysql_result($query,"id"); }
now you get prev id from array:
array[$CurrentIndex -1][0]