Re: [PHP] Question to example from manual

2005-06-16 Thread Richard Lynch
On Thu, June 16, 2005 1:31 pm, janbro said:
> Hi, I've been working on this example and copied it in my
> webroot, it doesn't give me an output. Does anybody know why?
> "System" WinXP  Apache 2.0.50 php 5.0.3
>
> thx
> janbro
>
>
> Example 7-6. Static variables with recursive functions
>
>  function Test()
> {
> static $count = 0;
>
> $count++;
> echo $count;
> if ($count < 10) {
> Test ();
> }
> $count--;
> }
> ?>

You defined the function, but never called it.

Add a line that does: Test(); at the end.

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] Question to example from manual

2005-06-16 Thread janbro
Hi, I've been working on this example and copied it in my
webroot, it doesn't give me an output. Does anybody know why?
"System" WinXP  Apache 2.0.50 php 5.0.3

thx
janbro


Example 7-6. Static variables with recursive functions



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php