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érables" => array ("About Les
Misérables"),
"Introduction" => array ("About Les Misérables"),
"Changes & Cuts" => array ("About Les Misérables"),
"Scores" => array ("About Les Misérables"),
"Orchestra" => array ("About Les Misérables"),
"Synthesizers" => array ("About Les Misérables"),
"Sound System" => array ("About Les Misérables"),
"Articles" => array ("About Les Misérables"),
"21st Century<br />Les Misérables" => array ("About Les
Misérables"),
"Information" => array ("About Les Misérables"),
"Discussion Forums" => array ("About Les Misé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]