Sorry Hugh - didn't mean to send it just to you!!

Hi!

Thanks for the help!

It works great, but I've now made the array 2 dimensional:

<?php
$index = array (
    "The Music Behind<br />Les Mis&eacute;rables" => array ("About Les
Mis&eacute;rables"),
    "Introduction" => array ("About Les Mis&eacute;rables"),
    "Changes &amp; Cuts" => array ("About Les Mis&eacute;rables"),
    "Scores" => array ("About Les Mis&eacute;rables"),
    "Orchestra" => array ("About Les Mis&eacute;rables"),
    "Synthesizers" => array ("About Les Mis&eacute;rables"),
    "Sound System" => array ("About Les Mis&eacute;rables"),
    "Articles" => array ("About Les Mis&eacute;rables"),
    "21st Century<br />Les Mis&eacute;rables" => array ("About Les
Mis&eacute;rables"),
    "Information" => array ("About Les Mis&eacute;rables"),
    "Discussion Forums" => array ("About Les Mis&eacute;rables")
);
?>

(they're not all the same - it's just for quick tesing purposes!)

Now in the nav menu I get:

Warning: Undefined offset: 0 in E:\inetpub\wwwroot\index.php on line 103
>
Warning: Undefined offset: 1 in E:\inetpub\wwwroot\index.php on line 103
>
Warning: Undefined offset: 2 in E:\inetpub\wwwroot\index.php on line 103
>
Warning: Undefined offset: 3 in E:\inetpub\wwwroot\index.php on line 103
>
etc... down to "10"




the rest of the script is:

<?php
$items = count($index);
for($i = 0; $i < $items; $i++) {
    echo "\n<tr><td class='navtext'";

    if ($sect == $i)
        echo " id='sel'";

    echo "><a href='index.php?sect=$i&id=0'>".$index[$i]."</a>";
<-------- LINE 103

    echo "</td></tr>";
}
?>


is it something to do with the "count($index)"?

Thanks for all the help!

Martin-)



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to