<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: PHP as a Tiny Database</title>
	<atom:link href="http://alex.mullr.net/blog/2009/01/php-as-a-tiny-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://alex.mullr.net/blog/2009/01/php-as-a-tiny-database/</link>
	<description>Hi. I&#039;m a student at the University of York, in the Computer Science and Maths departments. I recently finished working at GlaxoSmithKline in London. And this is my blog.</description>
	<lastBuildDate>Sat, 14 Jan 2012 23:58:59 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Alex Muller</title>
		<link>http://alex.mullr.net/blog/2009/01/php-as-a-tiny-database/#comment-2704</link>
		<dc:creator>Alex Muller</dc:creator>
		<pubDate>Wed, 14 Jan 2009 10:06:27 +0000</pubDate>
		<guid isPermaLink="false">http://alex.mullr.net/blog/?p=323#comment-2704</guid>
		<description>&lt;p&gt;Cheers Chris - I had no idea how to do arrays in PHP, but it&#039;s something I&#039;ll have a look at :)&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Cheers Chris &#8211; I had no idea how to do arrays in PHP, but it&#8217;s something I&#8217;ll have a look at :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Chris Northwood</title>
		<link>http://alex.mullr.net/blog/2009/01/php-as-a-tiny-database/#comment-2702</link>
		<dc:creator>Chris Northwood</dc:creator>
		<pubDate>Wed, 14 Jan 2009 00:09:22 +0000</pubDate>
		<guid isPermaLink="false">http://alex.mullr.net/blog/?p=323#comment-2702</guid>
		<description>&lt;p&gt;It&#039;s certainly an interesting way of doing things. A more traditional approach would be something along the lines of a multi-dimensional array:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;&lt;?php
$db = array(
array(&#039;author&#039; =&gt; &#039;Seán A. O&#039;Hara&#039;, &#039;url&#039; =&gt; &#039;http://flickr.com/photos/hortulus_aptus/2367460316/&#039;),
array(&#039;author&#039; =&gt; &#039;Jule Berlin&#039;, &#039;url&#039; =&gt; &#039;http://flickr.com/photos/jule_berlin/571121649/&#039;)
)
$thePhoto = mt_rand(0, count($db)-1);
$myelement = $db[$mt_rand];
?&gt;
&lt;img src=&quot;http://mullr.foo/img.jpg&quot; width=&quot;340px&quot; /&gt;
&lt;a href=&quot;&quot;&gt;Image&lt;/a&gt; by &lt;/code&gt;&lt;/p&gt;

&lt;p&gt;This then avoids the nasty $$ thing you&#039;ve got above&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>It&#8217;s certainly an interesting way of doing things. A more traditional approach would be something along the lines of a multi-dimensional array:</p>

<p><code>&lt;?php
$db = array(
array('author' =&gt; 'Seán A. O'Hara', 'url' =&gt; '<a href="http://flickr.com/photos/hortulus_aptus/2367460316/" rel="nofollow">http://flickr.com/photos/hortulus_aptus/2367460316/</a>'),
array('author' =&gt; 'Jule Berlin', 'url' =&gt; '<a href="http://flickr.com/photos/jule_berlin/571121649/" rel="nofollow">http://flickr.com/photos/jule_berlin/571121649/</a>')
)
$thePhoto = mt_rand(0, count($db)-1);
$myelement = $db[$mt_rand];
?&gt;
&lt;img src="http://mullr.foo/img.jpg" width="340px" /&gt;
&lt;a href=""&gt;Image&lt;/a> by </code></p>

<p>This then avoids the nasty $$ thing you&#8217;ve got above</p>]]></content:encoded>
	</item>
</channel>
</rss>

