![]() Topic awaiting preservation: PHP: variable usage in Title tags (Page 1 of 1) |
|
---|---|
Maniac (V) Mad Scientist From: Jacks raging bile duct.... |
![]() 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 |
![]() pagename being the title of the page? |
Maniac (V) Mad Scientist with Finglongers From: Cell 53, East Wing |
![]() Boudga: Do you mean use PHP to write into <title></title> tags or something more complex? |
Paranoid (IV) Inmate From: 127.0.0.1 |
![]() |
Bipolar (III) Inmate From: INFRONT OF MY PC |
![]() in php? i only know asp but i would do it like this: |
Maniac (V) Mad Scientist From: Jacks raging bile duct.... |
![]() 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 |
![]() 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 |
![]() |
Paranoid (IV) Inmate From: Minneapolis, MN, USA |
![]() 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. |