<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>unsharpTech &#187; PHP</title>
	<atom:link href="http://unsharptech.com/category/web-dev/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://unsharptech.com</link>
	<description>when the bleeding edge just doesn&#039;t cut it</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:06:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Echo PHP Nested Array Contents + Keys</title>
		<link>http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/</link>
		<comments>http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/#comments</comments>
		<pubDate>Sat, 03 May 2008 20:31:11 +0000</pubDate>
		<dc:creator>sam</dc:creator>
				<category><![CDATA[Fixes]]></category>
		<category><![CDATA[How2]]></category>
		<category><![CDATA[Notes]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Web Dev]]></category>

		<guid isPermaLink="false">http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/</guid>
		<description><![CDATA[I&#8217;ve always had some trouble with the syntax for accessing Nested Arrays and their Keys in PHP so I wanted to make note of this. Structure is as follows: print_r $contents; ([Cutbacks.jpg] =&#62; Array ( [time] =&#62; 1207637110 [hash] =&#62; 05dee882129fe1574bcc8379ad3a40ac [size] =&#62; 43928 ) [matrix3.zip] =&#62; Array ( [time] =&#62; 1208040588 [hash] =&#62; 5f317404880304b82e9502fb399f2737 [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://unsharptech.com/wp-content/php.gif" alt="PHP Logo" align="right" />I&#8217;ve always had some trouble with the syntax for accessing Nested Arrays and their Keys in PHP so I wanted to make note of this.</p>
<p><span id="more-30"></span></p>
<p>Structure is as follows:</p>
<pre class="brush: php">print_r $contents;</pre>
<pre>([Cutbacks.jpg] =&gt; Array
(
[time] =&gt; 1207637110
[hash] =&gt; 05dee882129fe1574bcc8379ad3a40ac
[size] =&gt; 43928
)
[matrix3.zip] =&gt; Array
(
[time] =&gt; 1208040588
[hash] =&gt; 5f317404880304b82e9502fb399f2737
[size] =&gt; 46790
)
)</pre>
<p>Code:</p>
<pre class="brush: php">
foreach( $contents as $key =&gt; $list ) {
echo &#039;Filename: &#039; . $key . &quot;\n&quot;;
echo &#039;Time: &#039; . $list[&#039;time&#039;] . &quot;\n&quot;;
echo &#039;Hash: &#039; . $list[&#039;hash&#039;] . &quot;\n&quot;;
echo &#039;Size: &#039; . $list[&#039;size&#039;] . &quot;\n&quot;;
echo &#039;----Next File----&#039; . &quot;\n&quot;;
}</pre>
<p>Outputs:</p>
<pre>Filename: Cutbacks.jpg
Time: 1207637110Hash: 05dee882129fe1574bcc8379ad3a40ac
Size: 43928
----Next File----
Filename: matrix3.zip
Time: 1208040588
Hash: 5f317404880304b82e9502fb399f2737
Size: 46790
----Next File----</pre>
]]></content:encoded>
			<wfw:commentRss>http://unsharptech.com/2008/05/03/echo-php-nested-array-contents-keys/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
