Does anybody know how to create a set of next and prev links for an image gallery.
The image is currently been loaded from an array via GET in the browser URL:
?image=1
$imageid=$_GET["image"];
This is then used to pull the correct image from an array created from a db:
echo '<img src="$image[$imageid]['location']" />';
I want the next and previous links to click through the array and if it reaches the end simply loop back to the beginning.
I have no idea how to create this and searching the internet for the last 2 hours I can't get anything working.
I believe I need to use the current $imageid to + / - a value for $next and $prev
I'm not 100% on how to do this.
All help appreciated.