Re: Re: Recursion
| From: | Andres Montiel | Date: | Mon, 01 Oct 2001 15:02:24 +0000 |
| Subject: | Re: Re: Recursion | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-69458@lists.php.net to get a copy of this message | ||
Thank you so much! This eases my worries for next semester.
Would happen to have an example script showing PHP using recursion?
Thanks again!
Martin wrote:
Hi Andres, Yes, PHP support "recoursion". That means, that you are calling a function again and again, but with new start-parameters. For example, if you want to search a harddisc for a file, you will call your function SearchFolder($path) with "C:\". If the function itself detects subfolder, it will call itself, but with the parameters "C:\Subfolder1", "C:\Subfolder2" and so on. You have to watch out then, the the function terminated correctly, if the searched file is found. Martin