Re: [PHP] Nested functions

2002-02-10 Thread DL Neil
Thanks for the confirmations Torben. Can one code user-defined functions nested within one another Yes. - and repeatedly execute them? No. ;) This is correct. As you know, the thing is that execution keeps running into that function declaration every time the containing function is

[PHP] Nested functions

2002-02-09 Thread DL Neil
Hi, Have been experimenting with the array_walk function and a little array debug print facility, but ran into a problem with nested functions. The code can be written with nested functions and successfully executed once; but when repeatedly executed an error appears. Can one code user-defined

Re: [PHP] Nested functions

2002-02-09 Thread Lars Torben Wilson
On Sat, 2002-02-09 at 15:40, DL Neil wrote: Hi, Have been experimenting with the array_walk function and a little array debug print facility, but ran into a problem with nested functions. The code can be written with nested functions and successfully executed once; but when repeatedly

Re: [PHP] nested functions

2001-05-16 Thread Hannes Schmiderer
elias wrote: good question...I might need an answer when you get one. Why? Ok, I have a perl-counter script which is included to shtml-pages with SSI. Now I want to add some PHP pages to my site. So I need a PHP-function that does the same as the perl-script does. In the script I have a lot of

Re: [PHP] nested functions

2001-05-16 Thread Christian Reiniger
On Wednesday 16 May 2001 12:12, Hannes Schmiderer wrote: elias wrote: good question...I might need an answer when you get one. Why? Ok, I have a perl-counter script which is included to shtml-pages with SSI. Now I want to add some PHP pages to my site. So I need a PHP-function that does

Re: [PHP] nested functions

2001-05-16 Thread Hannes Schmiderer
What about using classes instead of outer functions? Classes provide rather nice (nestable) scoping. You're right! If I had written it from scratch classes would be the best way! Although, I'm a newbie and I haven't read the PHP object oriented capter yet ;-). Hannes -- PHP General Mailing

[PHP] nested functions

2001-05-15 Thread Johannes Schmiderer
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

Re: [PHP] nested functions

2001-05-15 Thread Gyozo Papp
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

Re: [PHP] nested functions

2001-05-15 Thread elias
good question...I might need an answer when you get one. -elias Johannes Schmiderer [EMAIL PROTECTED] wrote in message 9ds7le$caa$[EMAIL PROTECTED]">news:9ds7le$caa$[EMAIL PROTECTED]... Is there no way to access the $x within the inner function: function outer() { $x = 50; function