<?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: Explosive PHP Application</title>
	<atom:link href="http://phpstarter.net/2009/02/explosive-php-application/feed/" rel="self" type="application/rss+xml" />
	<link>http://phpstarter.net/2009/02/explosive-php-application/</link>
	<description>PHP Tips &#38; Tools From Starters to Experts</description>
	<lastBuildDate>Sat, 17 Mar 2012 08:13:30 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Andrew</title>
		<link>http://phpstarter.net/2009/02/explosive-php-application/comment-page-1/#comment-94</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Mon, 16 Feb 2009 16:29:24 +0000</pubDate>
		<guid isPermaLink="false">http://phpstarter.net/?p=341#comment-94</guid>
		<description>I think they both have their pluses and minuses.  If I used the &quot;explosive method&quot;, I would probably allow line breaks after the comma.  This could be achieved by putting array_map(&#039;trim&#039;, $links); after $links = explode(&quot;,&quot;,$links); to take out any breaks from the elements, then you can do something like:

[sourcecode language=&quot;php&quot;]
$links = &quot;Home:index.php,About Us:about.php,
			Contact Us:contact.php,Portfolio:portfolio.php&quot;;
[/sourcecode]

It would certainly make it more readable if there were a couple dozen links.</description>
		<content:encoded><![CDATA[<p>I think they both have their pluses and minuses.  If I used the &#8220;explosive method&#8221;, I would probably allow line breaks after the comma.  This could be achieved by putting array_map(&#8216;trim&#8217;, $links); after $links = explode(&#8220;,&#8221;,$links); to take out any breaks from the elements, then you can do something like:</p>
<pre class="brush: php">
$links = &quot;Home:index.php,About Us:about.php,
			Contact Us:contact.php,Portfolio:portfolio.php&quot;;
</pre>
<p>It would certainly make it more readable if there were a couple dozen links.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kurtis</title>
		<link>http://phpstarter.net/2009/02/explosive-php-application/comment-page-1/#comment-89</link>
		<dc:creator>Kurtis</dc:creator>
		<pubDate>Mon, 16 Feb 2009 03:06:22 +0000</pubDate>
		<guid isPermaLink="false">http://phpstarter.net/?p=341#comment-89</guid>
		<description>Sure, there are certainly alternatives, but in my opinion, none is more &quot;cryptic&quot; than the other.  Your array solution and my variable solution are on the same level with what I was trying to achieve: making an easy-to-update solution.  With my method, simply add a &quot;,Text:href&quot; pair to the end of the variable.  With yours, simply add a &quot;,&#039;Text&#039; =&gt; &#039;href&#039;&quot; pair to the end of the array.  The simplicity is maintained across the board.</description>
		<content:encoded><![CDATA[<p>Sure, there are certainly alternatives, but in my opinion, none is more &#8220;cryptic&#8221; than the other.  Your array solution and my variable solution are on the same level with what I was trying to achieve: making an easy-to-update solution.  With my method, simply add a &#8220;,Text:href&#8221; pair to the end of the variable.  With yours, simply add a &#8220;,&#8217;Text&#8217; =&gt; &#8216;href&#8217;&#8221; pair to the end of the array.  The simplicity is maintained across the board.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt (aka teammatt3)</title>
		<link>http://phpstarter.net/2009/02/explosive-php-application/comment-page-1/#comment-88</link>
		<dc:creator>Matt (aka teammatt3)</dc:creator>
		<pubDate>Mon, 16 Feb 2009 02:18:33 +0000</pubDate>
		<guid isPermaLink="false">http://phpstarter.net/?p=341#comment-88</guid>
		<description>&quot;With this application, to update the navigation, instead of sifting through what could become complex HTML, you simply need to edit the “links” variable&quot;

It appears to me that sifting through that cryptic variable would always be harder than editing HTML (even if the HTML was complex). It is also difficult to debug if you make a mistake in the syntax. 

Aren&#039;t there better ways to solve this problem?

Include a page that has the basic HTML of the links wrapped in list item tags. (You could make it a function that prints HTML if you don&#039;t want to access the file system). 

Why not use a regular array instead of a cryptic string?

array(&quot;Home&quot; =&gt; &quot;index.php&quot;,
&quot;About Us&quot; =&gt; &quot;aboutus.php&quot;);</description>
		<content:encoded><![CDATA[<p>&#8220;With this application, to update the navigation, instead of sifting through what could become complex HTML, you simply need to edit the “links” variable&#8221;</p>
<p>It appears to me that sifting through that cryptic variable would always be harder than editing HTML (even if the HTML was complex). It is also difficult to debug if you make a mistake in the syntax. </p>
<p>Aren&#8217;t there better ways to solve this problem?</p>
<p>Include a page that has the basic HTML of the links wrapped in list item tags. (You could make it a function that prints HTML if you don&#8217;t want to access the file system). </p>
<p>Why not use a regular array instead of a cryptic string?</p>
<p>array(&#8220;Home&#8221; =&gt; &#8220;index.php&#8221;,<br />
&#8220;About Us&#8221; =&gt; &#8220;aboutus.php&#8221;);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

