You are here: Re: includes and keywords « All PHP « IT news, forums, messages
Re: includes and keywords

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
}
....
?>

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация