<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Sun, 07 Sep 2008 15:55:20 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Daniel Cousineau's Blog: Displaying N-Deep Trees (Remember Your Algorithms Course?)]]></title>
      <guid>http://www.phpdeveloper.org/news/10784</guid>
      <link>http://www.phpdeveloper.org/news/10784</link>
      <description><![CDATA[<p>
On his Tower of Power blog <i>Daniel Cousineau</i> has <a href="http://www.toosweettobesour.com/2008/08/05/displaying-n-deep-trees-remember-your-algorithms-course/">written up a look</a> at using a more detailed categorization method than just a parent/child relationship on your data - <a href="http://en.wikipedia.org/wiki/Tree_traversal">Tree Traversals</a>.
</p>
<blockquote>
If the software calls for only 2 levels of categorization (Parent and Child only), a simple nested for loop will suffice. However, software requirements change and you'll soon find yourself up shit creek without a paddle if you need to support 3 or 4 levels of nesting. [...] To those who's training is less formal (most web developers I meet have practical training, not formal), I'll help you out: <a href="http://en.wikipedia.org/wiki/Tree_traversal">Tree Traversals</a> (or if you are completely lost, <a href="http://en.wikipedia.org/wiki/Recursion">Recursion</a>).
</blockquote>
<p>
He creates a recursive function that, when passed in a category set with different types in it, can handle each of them and then calls itself again with the new child data. His sample code creates url out of a set of categories.
</p>]]></description>
      <pubDate>Thu, 07 Aug 2008 12:03:23 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Developing a Discussion Forum in PHP with Recursion (Part 3)]]></title>
      <guid>http://www.phpdeveloper.org/news/5371</guid>
      <link>http://www.phpdeveloper.org/news/5371</link>
      <description><![CDATA[<p>
On DevShed today, they've posted <a href="http://www.devshed.com/c/a/PHP/Developing-a-Discussion-Forum-in-PHP-with-Recursion/">this new tutorial</a> continuing their "recursion in PHP" series - "Developing a Discussion Forum in PHP with Recursion".
</p>
<quote>
<i>
After covering in detail how to define recursive method and functions, the question is: what comes next? Luckily, there's vast terrain to explore with reference to using recursion in PHP. As I said in previous articles of this series, recursion can be used in cases where a specific tree structure or a linked list needs to be navigated, in order to display, add, delete or edit its values. It's exactly for that reason that this last article will be focused on building an extensible discussion forum, which precisely uses a tree structure (implemented on a single MySQL database table) for displaying forum messages and adding new posts.
</i>
</quote>
<p>
Using what they've taught in the first <a href="http://www.phpdeveloper.org/news/5285">two</a> <a href="http://www.phpdeveloper.org/news/5336">parts</a> of the series, they put it to good use, giving you a step-by-step guide to a simple recursive forum. They start with the database structure (always a good thing) and work out from there, creating the "ThreadProcessor" class and fetch functionality to grab the thread's contents. They also include a bit of functionality to create threads as well. It's not much more than that, so don't expect too much, but it is a great place to start.
</p>]]></description>
      <pubDate>Mon, 15 May 2006 11:44:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Zend Developer Zone: 2 Beginners Guides I Wish I had when I Started with PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/5338</guid>
      <link>http://www.phpdeveloper.org/news/5338</link>
      <description><![CDATA[<p>
From <i>Cal Evans</i> over on the Zend Developer Zone today comes <a href="http://devzone.zend.com/node/view/id/237">two links</a> for beginner guides the "wished he'd had when he was starting PHP".
</p>
<quote>
<i>
<p>
Everybody starts somewhere. I started (officially) with my Commodore 64. I wrote my first commercial program on it and it started a life-long obsession with programming. Being a self-taught programmer, there are gaps in my education. The 2 biggest areas I have trouble with are Recursion and Graphics. Thank (generic deity reference) for the Web. 
</p>
<p>
While surfing around today, I stumbled upon 2 tutorials covering those two areas. They are well written, informative and free so I thought I'd share them with you on the off-chance you struggle with them as well.
</p>
</i>
</quote>
<p>
The two <a href="http://devzone.zend.com/node/view/id/237">he shares</a> are <a href="http://www.devshed.com/c/a/PHP/Fundamentals-of-Recursion-in-PHP/">this guide to recusion</a> from DevShed and a guide from Builder.com on the <a href="http://builder.com.com/5100-6371-5092227.html">creation of graphics</a> on the fly.
</p>]]></description>
      <pubDate>Tue, 09 May 2006 06:45:55 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Using Recursive Methods in Object-based PHP Applications (Part 2)]]></title>
      <guid>http://www.phpdeveloper.org/news/5336</guid>
      <link>http://www.phpdeveloper.org/news/5336</link>
      <description><![CDATA[<p>
DevShed has posted <a href="http://www.devshed.com/c/a/PHP/Using-Recursive-Methods-in-Objectbased-PHP-Applications/">part two</a> of their series dealing with recusion in PHP, this time with a focus on its use in a more object-oriented environment.
</p>
<quote>
<i>
<p>
Welcome to the second tutorial of the series "Recursion in PHP." Comprised of three parts, this series introduces the fundamentals of recursion in PHP, including the definition and use of recursive functions in procedural PHP scripts, as well as the creation of recursive methods in object-oriented Web applications.
</p>
<p>
Now, in this second part of the series, I'll explore some advanced uses of recursion in PHP, particularly in the terrain of object-oriented programming. I will develop a couple of object-based applications which use recursive methods for accomplishing their tasks. By the end of this tutorial, you should have a pretty solid grounding in how to define recursive methods within your own PHP classes.
</p>
</i>
</quote>
<p>
They <a href="http://www.devshed.com/c/a/PHP/Using-Recursive-Methods-in-Objectbased-PHP-Applications/">start</a> with a simple example of OOP with recursion, handling some "HTML widgets" to be output to a page (div, h1, p, and ul tags). With this library created and in place, they work up a "generator" class to actually build the page dynamically. Finally, they bring it all together with the creation of a simple template processor for simple page creation.
</p>]]></description>
      <pubDate>Tue, 09 May 2006 06:25:54 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[DevShed: Fundamentals of Recursion in PHP (Part 1)]]></title>
      <guid>http://www.phpdeveloper.org/news/5285</guid>
      <link>http://www.phpdeveloper.org/news/5285</link>
      <description><![CDATA[<p>
DevShed has posted their latest tutorial today, a look at some of the <a href="http://www.devshed.com/c/a/PHP/Fundamentals-of-Recursion-in-PHP/">basics of recursion</a> and working with it in PHP.
</p>
<quote>
<i>
<p>
Iteration is a straightforward concept. Recursion is a bit more complicated; it can be defined as a regular function that calls itself. PHP supports recursive functions. This article, the first of three parts, will explain recursive functions and help you see why they are useful.
</p>
<p>
Considering the important role that recursion plays in most programming languages, and specifically in PHP, over this series I'll be demonstrating how to define and use recursive functions with numerous code samples, thus you can learn quickly how to include them in your own PHP scripts.
</p>
</i>
</quote>
<p>
If you've never used recursion, you're in luck - they <a href="http://www.devshed.com/c/a/PHP/Fundamentals-of-Recursion-in-PHP/">start from the very beginning</a>, explaining it with a simple example of pushing the entire contents of an array (with subarrays) out to a file. They use this exmaple as a base to improve the function, adding the function to write the data out. They finish it off with two handy recursive functions for everyday use - one to escape the entire contents of an array and one that does the same, but checks to see if magic quotes is on.
</p>]]></description>
      <pubDate>Tue, 02 May 2006 07:31:46 -0500</pubDate>
    </item>
  </channel>
</rss>
