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

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

 

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

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