|
Posted by ZeldorBlat on 07/02/07 14:03
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
}
....
?>
[Back to original message]
|