Re: Including file...
| From: | Yasuo Ohgaki | Date: | Sun, 11 Mar 2001 03:36:17 +0000 |
| Subject: | Re: Including file... | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-43367@lists.php.net to get a copy of this message | ||
""Martin Hughes"" <mailing.lists@ukgateway.net> wrote in message
news:MABBLKKCJCCHOCHAHJCGKEFECHAA.mailing.lists@ukgateway.net...
> I seem to be making a mistake somewhere...
>
>
> # Define the navigation bar array
> $navbar = array("navmain", "info", "music", "orch",
> "synth", "syntype",
> "audio", "recordings");
>
> # Define the pages in arrays by section
> $main = array("home");
> $info = array("infomain", "about", "contact",
> "guestbook");
> $music = array("musicmain", "musprologue", "mus1",
> "mus2", ......, "mus28",
> "musepilogue", "musbows", "musplayout");
> $orch = array("orchmain", "strings", "brass",
> "woodwind", "percussion",
> "rhythm");
> $synth = array("synthmain", "part", "patches");
> $synthtype = array("synthtypemain", "dx7", "k2000",
> "k2vx", "k2500");
> $audio = array("audiomain", "synth");
> $recordings = array("recordingsmain", "reccompare", "olc",
> "obc", "csr",
> "tac", "lon97");
>
> # Store the arrays in an array
> $sections = array("&$main", "&$info", "&$music",
> "&$orch", "&$synth",
> "&$synthtype", "&$audio", "&$recordings")
Why do you enclose with double quotes? You dont need them at all, try w/o
double qoute. Should work then.
Regards,
--
Yasuo Ohgaki
PHP and Related resources
[PHP FAQ] http://www.php.net/FAQ.php
[PHP Manual] http://www.php.net/manual/en/
[PHP Links] http://www.php.net/links.php
[RFCs] http://www.faqs.org/rfcs/
>
> # Create the name of the .inc file
> $pagename = $sections[$sect][$page]; # *******THIS LINE IS CAUSING A PARSE
> ERROR*******
> $navname = $navbar[$nav];
>
>
> I then want to include the file $pagename.inc in the main frame, and
> $navname.inc in side.php
>
>
> Cheers,
>
>
> Martin :0)
>
> ==============================================
> Musical Director
> University of York Gilbert & Sullivan Society
> 177 Hull Road, York YO10 3JY
> 01904 427 537 / 07951 015 220
> mth100@york.ac.uk
> http://www.mixermanic.co.uk
> ==============================================
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>