Navigation bar using PHP I would like to know what you think:

&lt;?php
 $nav_normal = array("1. Home","2. Read Me","3. License Agreement","4. General Information","5. Database Installer","6. Create an Account","7. Create Config","8. Successfully installed"
    );

$last_normal = array_pop(array_keys($nav_normal));

foreach($nav_normal as $name){

    if($Nav_ID == $name){
            $Nav_Type = "Selected";
    }else{
            $Nav_Type = "Unselected";
    }

    ?&gt;&lt;li class="&lt;?php echo($Nav_Type); ?&gt;"&gt;&lt;?php echo($name); ?&gt;&lt;/li&gt;&lt;?php
            //this part is only for the (google chrome) view-source:\\
            //this will not be shown into the normal layout/output\\
            if($name != $last_normal){
                    echo("\n                                        ");
            }else{
                    echo("\n");
            }

}  


On each page I write at the place of the navigation bar:

&lt;?php
 $Nav_ID = "1. Home"; //etc. etc.\\
 include_once("navigation.php");
?&gt;


I hope you can give me a review on what you think is either good or bad.  Just give your opinion.
&lt;?php

// first up i have removed the numbers, those numbers can be automatically added using an ordered list,
// then if you add a menu option later you don't have to renumber everything and look through every file to check the $Nav_ID matches
$nav_normal = array("Home","Read Me","License Agreement","General Information","Database Installer","Create an Account","Create Config","Successfully installed");

// removed as documented below
// $last_normal = array_pop(array_keys($nav_normal));

// we need to start the list somewhere?, using an ordered list will automatically number the menu options
echo "&lt;ol&gt;";

foreach($nav_normal as $name){

    if($Nav_ID == $name){
        // $Nav_Type is not very descriptive
        // $Nav_Type = "Selected";
        $Nav_Selected = "Selected";
    } else {
        $Nav_Selected = '';
        // it is not necessary to have a state for unselected
//        $Nav_Type = "Unselected";
    }

    // the last if/else block could be replaced by this single line
    $Nav_Selected = ($Nav_ID == $name) ? "Selected" : '';



    // it is not worth escaping php for a single, line, it is easier just to embed the html and echo it
    // make sure we call htmlspecialchars or characters like &gt;&lt; &amp; " etc will stuff up your html
    echo "&lt;li class=\"$Nav_Selected\"&gt;".htmlspecialchars($name)."&lt;/li&gt;";

    // this makes no visible difference, multiple spaces are rendered as one in html
//    if($name != $last_normal){
//        echo("\n                                        ");
//    }else{
        echo "\n";
//    }

}

// if we want extra spaces after the last item in the loop, just echo them after the loop has finished
echo "                                        ";

// don't forget to close the ordered list too
echo "&lt;/ol&gt;";