re:array navigation
[email protected] (Joseph H Blythe) Fri, 09 Jun 2000 15:09:33 +0930
| Newsgroups | php.version4 |
|---|---|
| Organization | Binary Logic |
| Message-ID | <[email protected]> |
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> <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: [email protected]