nested functions

From: Date: Tue, 15 May 2001 21:41:21 +0000
Subject: nested functions
Groups: php.general 
Request: Send a blank email to php-general+get-52936@lists.php.net to get a copy of this message
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

« previous php.general (#52936) next »