RE: [PHP] Re: PHP Includes and Echoes (From the top...)
| From: | Ford, Mike [LSS] | Date: | Fri, 16 Jan 2004 15:17:41 +0000 |
| Subject: | RE: [PHP] Re: PHP Includes and Echoes (From the top...) | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-174819@lists.php.net to get a copy of this message | ||
On 16 January 2004 13:54, Freedomware wrote:
> Thanks for all the tips. It's getting generally getting
> clearer, but I'm
> a little confused somewhere.
[SNIP]
> I inserted one of the functions you suggested - $includea1 = TRUE; -
> after the include, but I'm sure I did it wrong.
Just like before -- put it *before* the include, otherwise the included file
won't see it.
[SNIP]
> //-->
> </script>';
> echo '<link href="' . $periods . 'css/a1.css"
> rel="stylesheet"
> type="text/css" />'; if ($includea1) echo '<link href="' .
> $periods .
> 'css' . $linkcontinent . '/a1.css" rel="stylesheet"
> type="text/css"
> />';
> echo '<link href="' . $periods . 'css/na/north.css"
> rel="stylesheet"
> type="text/css" />'; echo '<link href="' . $periods .
> 'css/themes/peace.css" rel="alternate stylesheet" type="text/css"
> title="Peace" />';
> echo '<link href="' . $periods . 'css/themes/war.css"
> rel="alternate
> stylesheet" type="text/css" title="War" />';
> echo '<link rel="SHORTCUT ICON"
> href="../../../../us/aaa/favicon.ico" />'
> >
>
> Note that two of my style sheets are named css/a1.css and
> css/na/a1.css (na is short for North America). Maybe I should rename
> the
> second a1 to
> avoid confusion, though I'd prefer to tackle it head on and
> learn how to
> deal with this situation. (Does $includea1 = TRUE; refer to css/a1.css
> or css/na/a1.css?)
Well, which one is controlled by the if ($includea1) test?
>
> So here's what I have at present:
>
Apart from the above points, looks ok for what you're trying to do. Keep
plugging away and you'll get there -- a couple of years ago I was a complete
PHP beginner (although an experienced programmer), and now I have several
thousand lines of code in production use!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: m.ford@leedsmet.ac.uk
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211