Navigation Usability

  Home arrow Navigation Usability arrow Page 2 - Using Multiple Pages for Navigation
NAVIGATION USABILITY

Using Multiple Pages for Navigation
By: Codewalkers
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 7
    2002-09-08

    Table of Contents:
  • Using Multiple Pages for Navigation
  • Recap
  • Setting up variables
  • Displaying links
  • Final Script

  •  
     

    SEARCH CODEWALKERS

    TOOLS YOU CAN USE

    advertisement

    Using Multiple Pages for Navigation - Recap


    (Page 2 of 5 )

    Let's start by taking a look at notepad's final script:

    <?php
    // if a page isn't defined, we're on page one
    if($page &lt;= 0)
    {
        
    $page 1;
    }

    // create an array of data
    $myArray file("data.txt");

    // reverse the order of the data
    $myArray array_reverse($myArray);

    // how many lines of data to display
    $display 5;

    // where to start depending on what page we're viewing
    $start = ($page $display) - $display;

    // the actual news we're going to print
    $news array_slice($myArray$start$display);

    // printing the data
    foreach($news as $key=&gt;$value)
    {
        print(
    "line $key: $value&lt;br&gt;\n");
    }
    ?>

    More Navigation Usability Articles
    More By Codewalkers

    blog comments powered by Disqus

    NAVIGATION USABILITY ARTICLES

    - Advanced Bulleted-List Menu
    - Using Multiple Pages for Navigation


    © 2003-2012 by Developer Shed. All rights reserved. DS Cluster 8 - Follow our Sitemap