<?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 Recursive Strings</title>
	<atom:link href="http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/</link>
	<description>Programming, Cars, and Life</description>
	<lastBuildDate>Fri, 03 Feb 2012 15:37:50 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Bret Kuhns</title>
		<link>http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/comment-page-1/#comment-8</link>
		<dc:creator>Bret Kuhns</dc:creator>
		<pubDate>Thu, 14 Jan 2010 19:39:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=1#comment-8</guid>
		<description>Hey Noah! I came to the same conclusion and you&#039;re exactly right. That&#039;s how I solved the problem. I guess I should&#039;ve mentioned that here, huh? I must have gotten too used to compiled languages for a while and PHP&#039;s line-by-line interpreting threw me a curve ball here.</description>
		<content:encoded><![CDATA[<p>Hey Noah! I came to the same conclusion and you&#8217;re exactly right. That&#8217;s how I solved the problem. I guess I should&#8217;ve mentioned that here, huh? I must have gotten too used to compiled languages for a while and PHP&#8217;s line-by-line interpreting threw me a curve ball here.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Noah</title>
		<link>http://www.bretkuhns.com/blog/2009/11/php-recursive-strings/comment-page-1/#comment-7</link>
		<dc:creator>Noah</dc:creator>
		<pubDate>Thu, 14 Jan 2010 19:32:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.bretkuhns.com/blog/?p=1#comment-7</guid>
		<description>This is what I would guess is happening:
1.  PHP creates $a.
2.  The initializer creates $a[0].  When it does this, $a[1] has no value since it has not yet been assigned, so &quot;test {$a[1]}&quot; evalulates to just &quot;test &quot;.  
3.  Same with $a[1].

If I&#039;m right, then you can actually use this as you intend, but by doing this:
$a = array(
     2 =&gt; &quot;argh&quot;,
     1 =&gt; &quot;blah {$a[2]}&quot;,
     0 =&gt; &quot;test {$a[1]}&quot;
);</description>
		<content:encoded><![CDATA[<p>This is what I would guess is happening:<br />
1.  PHP creates $a.<br />
2.  The initializer creates $a[0].  When it does this, $a[1] has no value since it has not yet been assigned, so &#8220;test {$a[1]}&#8221; evalulates to just &#8220;test &#8220;.<br />
3.  Same with $a[1].</p>
<p>If I&#8217;m right, then you can actually use this as you intend, but by doing this:<br />
$a = array(<br />
     2 =&gt; &#8220;argh&#8221;,<br />
     1 =&gt; &#8220;blah {$a[2]}&#8221;,<br />
     0 =&gt; &#8220;test {$a[1]}&#8221;<br />
);</p>
]]></content:encoded>
	</item>
</channel>
</rss>

