RE: [PHP-DB] Calling functions recursively: recursive PHP functions
| From: | John W. Holmes | Date: | Mon, 27 Jan 2003 06:57:35 +0000 |
| Subject: | RE: [PHP-DB] Calling functions recursively: recursive PHP functions | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-25160@lists.php.net to get a copy of this message | ||
[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/