You are here: Re: variable howto « PHP Programming Language « IT news, forums, messages
Re: variable howto

Posted by Chung Leong on 11/28/05 17:52

rut wrote:
> I have this in a .inc (include file):
>
> <title> <?php $page_title; ?></title>
>
> in the php page I have this:
>
> <?php
> $page_title = 'Reidsville Christian Church';
> include('./include/template.inc');
> ?>
>
> This works well.
>
> I'd like to do the same for the .css file to include in the php page.
> Something like this:
>
> In template.inc
> <link href= $page_css rel="stylesheet" type="text/css">
>
> In index.php
>
> <?php
> $page_title = 'Reidsville Christian Church';
> include('./include/template.inc');
> $page_css = 'index.css';
> ?>
>
>
> This doesn't work. I suspect I'm refering to the $page_css incorrectly
> in the template.inc file.
> Can someone help on this?
>
> Thanks
> Rut

You need <link href="<?php echo $page_css; ?>" rel="stylesheet"
type="text/css">

 

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

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