I used that technique before PHP was available (for all readers, the key term here is 
Server Side Includes, e.g. With PHP 
you're a lot more flexible so that you should get rid of your shtml structure, 
especially as PHP is much faster what really makes a difference if you've got many 

For this simple example, the syntax is quite similar. In your main document, simply 

   $title="some title";

and in the header.html:

<title><?PHP echo $title; ?></title>

That's it. But remember to either set *.html files to be parsed through PHP in your 
web server configuration or rename the main document to .php (or .php3 or .php4 or 
whatever your web server needs).

>Thanks for the prompt replies...but I think I should clarify...
>In regular html, I would do this:
><!--#set var="TITLE" value="some title here"-->
><!--#include virtual="/include/header.html" -->
>and header.html would have in it (among other things):
><title><!--#echo var="TITLE" --></title>
>So, the title of the webpage would be "some title here"...
>How can I accomplish the same thing in PHP?

mit freundlichen Gruessen / yours sincerely

Gunther E. Biernat
Web Application Engineer

RealNetworks GmbH                   Tel.: +49-40-415204-24
Weidestraße 128                     Fax.: +49-40-415204-11
22083 Hamburg                       Mail: [EMAIL PROTECTED]
Germany                             URL :

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to