----- Original Message ----- 
From: "Remi Ricard" <[EMAIL PROTECTED]>


> Hi,
> 
> I want to know why in the second file I don't get
> a=134 as expected.
<snip> 
> // file that don't work as expected
> // print a=
> <?PHP
> function f2()
> {
>   include ('./fileToBeIncluded.php');
>   f1();
> }
> echo "<html>";
> f2();
> echo "</html>";
> ?>

Hi,

Functions are separate blocks of code from the rest 
of the file. If you declare a function or variable inside 
a function (as you do here, since you include the file 
which contains a function inside the function) it 
will not be available to the rest of the script.

I think. :-)

Anna


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to