|
Posted by mr rudeforth on 07/03/07 08:00
"ZeldorBlat" <zeldorblat@gmail.com> wrote in message
news:1183385033.884913.287350@k79g2000hse.googlegroups.com...
> On Jul 2, 5:45 am, "mr rudeforth" <m...@no.co.uk> wrote:
> > hello good people, i hope i can explain my problem/question/request
> > properly,
> >
> > when i create websites i use 'includes' to bring in the headers menus
> > footers etc.
> >
> > what i was wondering was, is there a way to tell the header which page
it is
> > being included in, and then make the header include the relevant
keywords
> > for that page?
> >
> > ie page1 includes header - header gets keywords for page1
> > page2 includes header - header gets keywords for page 2
> >
> > i am a bit of a jargon free zone so please be gentle with me
> > thank you
> > kev
>
> Rather than tell the header which page he's being included in, I would
> simply define the keywords on the page itself before including the
> header. So, something like this:
>
> page.php:
> <?php
> $keywords = array('foo', 'bar', 'baz');
> include('header.php');
> ...
> ?>
>
> header.php:
> <?php
> if(isset($keywords)) {
> //do what you want with the keywords
> }
> ...
> ?>
ok cheers i will give it a go, but i may be back if (as is likely) i get
slightly confused. thanks again
[Back to original message]
|