why don't you pass $x as an argument?
----- Original Message -----
From: "Johannes Schmiderer" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 2001. május 15. 23:41
Subject: [PHP] nested functions
> Is there no way to access the $x within the inner function:
>
> function outer()
> {
> $x = 50;
> function inner()
> {
> echo $x;
> }
>
> inner();
> }
>
> Global in the inner function does not work. I do not want to have $x global
> for all.
>
> Hannes Schmiderer
>
>
>
>
> --
> 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]
>
--
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]