Re: External Files (take 2)

From: Date: Mon, 20 Sep 2004 20:47:20 +0000
Subject: Re: External Files (take 2)
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-197347@lists.php.net to get a copy of this message
GH wrote:
So i would not need to use <?PHP / ?> correct... Also as to the other question I asked: WHat should I use in the other file? the complete connection code or just the values as variables? <snip>
Yes, you need to enclose it in opening/closing php tags. It will include the file inline, just as if you wrote the code in that spot of your original file. So if you have.... $foo = "bar"; include ( "myincludefile.php" ); and myincludefile.php is... <?php $foo .= " is very common in programming."; ?> $foo will now equal "bar is very common in programming" right after you include the file. -- John C. Nichel ÜberGeek KegWorks.com 716.856.9675 john@kegworks.com

« previous php.general (#197347) next »