Re: nested functions
| From: | elias | Date: | Wed, 16 May 2001 16:06:37 +0000 |
| Subject: | Re: nested functions | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-52990@lists.php.net to get a copy of this message | ||
good question...I might need an answer when you get one.
-elias
""Johannes Schmiderer"" <johannes.schmiderer@aon.at> wrote in message
news:9ds7le$caa$1@toye.p.sourceforge.net...
> 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: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>