Re: inserting PHP code into PHP document

From: Date: Wed, 15 May 2002 00:49:43 +0000
Subject: Re: inserting PHP code into PHP document
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-97650@lists.php.net to get a copy of this message
In article <000c01c1fba6$12a4aed0$01000001@pawel>, pax@cfl.rr.com says... > Hi All: > > Many of my pages has similar lines of code that I would like to group > and have it inserted when required: > > if ($HTTP_SESSION_VARS[first_name]){ > $header='...'; > .... > } else { > $header='...'; > }; > > I placed the code in separate file and tried implode but I think I am > doing something wrong. > > How can I make it in some type of module and insert it in php code when > required? > > Thanks > Paul You should look at include() or require() -- David Robley Temporary Kiwi! Quod subigo farinam

« previous php.general (#97650) next »