Note that there are some explanatory texts on larger screens.

plurals
  1. POphp array of webpages - want to be able to cycle through them with NEXT - PREV links
    primarykey
    data
    text
    <p>Based on Hunter F's answer, the solution to my problem is almost complete. Just a couple of tweaks needed. </p> <p>I modified the code a little and submitted a new question here at: <a href="https://stackoverflow.com/q/10932663/1176165">php array help required - if current array item = &#39;last or first item&#39; then &#39;do something&#39;</a></p> <p>ORIGINAL MESSAGE:</p> <p>I want to be able to create a simple navigation bar with PREV and NEXT links that I can use to cycle though a list of pages. The navigation bar will be a php include within all of the pages to be cycled.</p> <p>So I guess the starting point is to create an array of the pages that need to be cycled though with the PREV NEXT links.</p> <p>Such as....</p> <pre><code>$projectlist = array( 'http://domain.com/monkey/', 'http://domain.com/tiger/', 'http://domain.com/banana/', 'http://domain.com/parrot/', 'http://domain.com/aeroplane/', ); </code></pre> <p>I want to option to re-order, add or remove the links. So having one self contained master array such as this seems like a logical choice to me as I'll only need to update this one list for any future additions. </p> <p>Each directory being linked to has it's own index.php file, so I've left the index.php part off from the end of the links as it's not needed...or is it?</p> <p>...I'm pretty stumped as of how to continue from here.</p> <p>I guess I need to work out which page within the array I'm currently on, then generate the PREV and NEXT links based on that. So If I entered from '<a href="http://domain.com/parrot/" rel="nofollow noreferrer">http://domain.com/parrot/</a>' I would need links to the relevant PREV and NEXT pages.</p> <p>Any help or information to guide me on this next stage would be most appreciated.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload