<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
<title>Snipplr - tylerhall</title>
<link>http://snipplr.com/users/tylerhall/language/php/tags/array</link>
<description>Recent snippets posted on Snipplr.com</description>
<language>en-us</language>
<pubDate>Wed, 03 Dec 2008 18:12:35 GMT</pubDate>
<item>
<title>(PHP) Build Nested Array From SQL</title>
<link>http://snipplr.com/view/4383/build-nested-array-from-sql/</link>
<description><![CDATA[ <p>During the time that I’ve been programming I’ve continually run into times when I needed to be able to store a multi-level list into a database and retrieve it. I’ve used this in a CMS system to allow uses to create and nest their own menu options or to allow users to create and nest categories of items. Saving it was never a problem, but retrieving it and building a PHP array with nested structure was a messy task. The problem was that you couldn’t easily enter a variable four levels deep into an array without knowing all of the parents of that item. This was okay if you retrieved the data in order of parents, but that meant if you wanted to sort the data by another column (such as name), you would have to do multiple passes through your data to continually reshuffle it.</p> ]]></description>
<pubDate>Wed, 19 Dec 2007 15:15:51 GMT</pubDate>
<guid>http://snipplr.com/view/4383/build-nested-array-from-sql/</guid>
</item>
<item>
<title>(PHP) Array of MIME Types</title>
<link>http://snipplr.com/view/1937/array-of-mime-types/</link>
<description><![CDATA[ <p>This is an associative array of nearly every common MIME type. It's useful when you need to serve a file for download but you don't know the correct content type. You can look it up using it's extension.</p> ]]></description>
<pubDate>Fri, 05 Jan 2007 15:23:45 GMT</pubDate>
<guid>http://snipplr.com/view/1937/array-of-mime-types/</guid>
</item>
</channel>
</rss>