Topic awaiting preservation: PHP: variable usage in Title tags (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: Jacks raging bile duct.... |
posted 08-20-2002 21:01
I am creating some PHP script that dynamically writes new webpages with "clientname: pagename" style Title tags and I would like to know if there is some way to assign a variable to that like "clientname: $pagename"? I have the PHP4 Bible and I don't see anything in there with regards to do that. |
Paranoid (IV) Inmate From: Dallas, TX |
posted 08-20-2002 22:14
pagename being the title of the page? |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 08-20-2002 22:56
Boudga: Do you mean use PHP to write into <title></title> tags or something more complex? |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-21-2002 00:34 |
Bipolar (III) Inmate From: INFRONT OF MY PC |
posted 08-21-2002 02:40
in php? i only know asp but i would do it like this: |
Maniac (V) Mad Scientist From: Jacks raging bile duct.... |
posted 08-21-2002 03:58
I believe Pugzly is right on in determining from my dribble what I want to do...thanks Pugzly I'll give that a whirl! |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
posted 08-21-2002 13:38
Well why don't you echo it straight into the <title></title> tags - that would seem more direct? |
Paranoid (IV) Inmate From: 127.0.0.1 |
posted 08-21-2002 15:15 |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
posted 08-21-2002 15:39
Another thing you can do is devise some sort of unique tag to put in the header file so you can read the file into a variable and do a str_replace with the variable in the page. For the Content management system I've been creating, I use <%% %%> tags. I thought of using XML, but it is so inefficient from a parsing standpoint. |