Re: [PHP] Re: Yet another question

2002-10-30 Thread user
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() {

		include("file");
.



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@;home.ro]
Sent: Thursday, 31 October 2002 10:56 AM
To: [EMAIL PROTECTED]
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
news:3DBF8DE6.70701@;freemail.gr...


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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php









--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




RE: [PHP] Re: Yet another question

2002-10-30 Thread Peter Houchin
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@;home.ro]
> Sent: Thursday, 31 October 2002 10:56 AM
> To: [EMAIL PROTECTED]
> 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
> news:3DBF8DE6.70701@;freemail.gr...
> > 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 (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Yet another question

2002-10-30 Thread Trasca Ion-Catalin
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
news:3DBF8DE6.70701@;freemail.gr...
> 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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[PHP] Re: Yet another question

2002-10-29 Thread Tjoumaidis
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 (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php