Besides that there is no reason to include the file after the use of the variable. When i started writing php i saw in every other program that the include was the first line in every function that needs it.
Like :
function test() {


Peter Houchin wrote:
try it and see .. though I am pretty sure that it won't work  unless you
define the variable else where in the file b4 calling it. other wise the
variable will either be blank or give you an error saying undefined variable
if it's used before the include.

-----Original Message-----
From: Trasca Ion-Catalin [mailto:tic2000@;]
Sent: Thursday, 31 October 2002 10:56 AM
Subject: [PHP] Re: Yet another question

Yes, this works, but only if I include the file before the use of the
variable, but, what if I use the include() after the use of the variable?

Trasca Ion-Catalin
"Tjoumaidis" <[EMAIL PROTECTED]> wrote in message

Yes if you include the file

include ("file");

then you can refer to any of the variables the file contains

Trasca Ion-Catalin wrote:

It's posible to call a variable from another file?

Trasca Ion-Catalin

PHP General Mailing List (
To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to