Re: [PHP] Scope of include

2007-01-18 Thread Stut
Robert Cummings wrote: To answer his question though, variables not declared via the "global" keyword and not accessed via the super global variables ($GLOBALS, $_SESSION, etc) inherit the scope in which the include statement occurs. Therefore, if in the included file all you have is: $foo =

Re: [PHP] Scope of include

2007-01-18 Thread Robert Cummings
On Thu, 2007-01-18 at 10:29 -0500, tedd wrote: > At 9:49 PM -0800 1/17/07, jekillen wrote: > >Hello php list: > >If I include a php script inside a php function definition and then call the > >function in another script. What is the scope of variables in the included > >script? Are they local to th

Re: [PHP] Scope of include

2007-01-18 Thread tedd
At 9:49 PM -0800 1/17/07, jekillen wrote: Hello php list: If I include a php script inside a php function definition and then call the function in another script. What is the scope of variables in the included script? Are they local to the function that calls include with the file name? Thanks in

Re: [PHP] Scope of include

2007-01-18 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2007-01-17 21:49:05 -0800: > Hello php list: > If I include a php script inside a php function definition and then > call the function in another script. What is the scope of variables in > the included script? Are they local to the function that calls include > with the file

Re: [PHP] Scope of include

2007-01-17 Thread Andrew Kreps
On 1/17/07, Andrew Kreps <[EMAIL PROTECTED]> wrote: On 1/17/07, jekillen <[EMAIL PROTECTED]> wrote: > Hello php list: > If I include a php script inside a php function definition and then > call the > function in another script. What is the scope of variables in the > included > script? Are they

Re: [PHP] Scope of include

2007-01-17 Thread Andrew Kreps
On 1/17/07, jekillen <[EMAIL PROTECTED]> wrote: Hello php list: If I include a php script inside a php function definition and then call the function in another script. What is the scope of variables in the included script? Are they local to the function that calls include with the file name? Tha

[PHP] Scope of include

2007-01-17 Thread jekillen
Hello php list: If I include a php script inside a php function definition and then call the function in another script. What is the scope of variables in the included script? Are they local to the function that calls include with the file name? Thanks in advance; I'm not sure where to look fo