re:array navigation

From: Date: Fri, 09 Jun 2000 05:39:33 +0000
Subject: re:array navigation
Groups: php.version4 
Request: Send a blank email to php-version4+get-16236@lists.php.net to get a copy of this message
Hi all, I had an idea (wow), what i would like to do is store all the pages in my site in an array inside an include file: $Nav = array( "0" => "zero.htm", "1" => "one.htm", "2" => "two.htm", "3" => "three.htm"); $Next = next($Nav); $Prev = prev($Nav); then have links on each page and of course include the file that contains the Nav array echo "<a href='$Next'>Next</a>&nbsp<a href='$Prev'>Prev</a>"; and of course this doesnt work as it will always point to: $Next = one.htm $Prev = zero.htm I have tried all sorts of thins using pos() and current() to no success. has anyone every tried to do something simular to this type of navigation, or am I just plain mad. Any help would be great. Joseph Blythe -- BoldFX / Binary Logic 257 Churchill Road Prospect South Australia 5082 Ph: (08) 8342 0022 Fax: (08) 8342 0155 mailto: joseph.blythe@binarylogic.com.au

« previous php.version4 (#16236) next »