New from Zend today, there's an article discussing something that most of the PHP coders I know avoid - Recursion in PHP.
In a recent survey I conducted (http://forums.dreamincode.net/index.php?showtopic=9158&hl=recursion), nearly half the PHP programmers I polled didn't really know what recursion was or how to use it. In this article, we will define recursion, contrast it with iteration, and step through two examples: factorials and file system traversal. We will also look at more advanced implications, such as the use of global variables and depth versus breadth traversal. Finally, we will clarify when it is most appropriate to use recursion and when iteration will suffice.
For anyone that's missed the power of this handy feature of programming in PHP, I would definitely suggest taking a look here. It might not be the most memory-friendly solution to a problem, but it can definitely be the easiest at times...
Also, for more on recursion, check out this DevShed article.




