Re: Function

From: Date: Wed, 22 May 2002 05:54:27 +0000
Subject: Re: Function
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-98684@lists.php.net to get a copy of this message
On Wed, 22 May 2002, Sqlcoders.com Programming Dept wrote: > When you include information from an include file, PHP treats the text as > inline code if you use the include() function. > > In other words, if you use code like this: > <?php > include 'file.php'; > ?> > > Then any functions inside file.php will be available just as if you'd > copy/pasted them in. > > If file.php contained: > function echoThis($this_text){ > echo($this_text); > } Just make sure your included file also starts with <? and ends with ?> miguel

« previous php.general (#98684) next »