Re: Variable PHP Includes - Is there such a thing?
| From: | Freedomware | Date: | Thu, 15 Jan 2004 07:19:36 +0000 |
| Subject: | Re: Variable PHP Includes - Is there such a thing? | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-174621@lists.php.net to get a copy of this message | ||
(Oops - I replied by e-mail; guess I should have posted my response to the list.)
--- Rory McKinley <rorym@nebula.co.za> wrote:
A possible option could be something like this {calling_template.php} <?php /*State name does not have to be set statically, can be set from SQL query etc*/I think I understand what you're saying. I'm just getting started with PHP and haven't touched MySQL yet, but I can see you're setting up a database, or "query," and... "> That way you can put whatever you want as the
statenameat the top of your pages, and the header willalways reflect it."Then you'd put some sort of code in the head section of each page that would draw on the system you set up to translate the codes for each page. I probably didn't work it right, but I think I get the general idea. I'll hang on to the code you gave me and play with it just as quick as I can learn more about this stuff. One question, is the example you gave me a pure PHP function, or does it indeed involve MySQL, too? Thanks!