RE: Calling functions recursively: recursive PHP functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[snip]
> <?php
> function Test()
> {
>     static $count = 0;
> 
>     $count++;
>     echo $count;
>     if ($count < 10) {
>         Test ();
>     }
>     $count--;
> }
> ?>
>
************************************************************************
**
> *
> Interesting but I am still lost as I need some help with
> methods/functions within objects:
> In the above example do I need to access Test() by:
> 
>     if ($count < 10) {
>         this->Test ();

Yes, without the space: $this->Test();

---John W. Holmes...

PHP Architect - A monthly magazine for PHP Professionals. Get your copy
today. http://www.phparch.com/



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


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux