<?xml version="1.0" ?>
<rss version="2.0">
	<channel>
		<title>Keith's Weblog: Comments on &quot;Updated function to merge two PHP arrays&quot;</title>
		<description>Keith's Weblog: Comments on &quot;Updated function to merge two PHP arrays&quot;, posted on July 10, 2003</description>
		<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2</link>

		<category>Programming</category>
		<language>en-us</language>
		<image>
			<link>http://keithdevens.com/weblog</link>
			<title>Keith Devens .com</title>
			<url>http://keithdevens.com/images/kbd.gif</url>
		</image>

		<item>
			<title>by M. Bean</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment2391</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment2391</guid>
			<pubDate>Fri, 11 Jul 2003 05:04:22 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;hehe... I was reading that as &amp;quot;a to the power of b&amp;quot;, in which case I was like &amp;quot;what kind of crack are you smoking?&amp;quot;&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Adam Langley</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment2394</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment2394</guid>
			<pubDate>Fri, 11 Jul 2003 10:16:45 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Well, &lt;a href=&quot;http://www.imperialviolet.org/page10.html#e182&quot;&gt;http://www.imperialviolet.org/page10.html#e182&lt;/a&gt; suggests that &amp;amp;cap; would do the trick. I'm not sure if you escape ampersands, so that's amp-cap-semicolon if you dont &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_side.gif&quot; alt=&quot;Smiley&quot; /&gt;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;AGL&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment2395</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment2395</guid>
			<pubDate>Fri, 11 Jul 2003 13:36:14 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Neat! Actually, HTML is escaped automatically, so I don't think I could do that if I wanted to &lt;img class=&quot;smiley&quot; src=&quot;/images/smiley_side.gif&quot; alt=&quot;Smiley&quot; /&gt; Something to think about for the next version of my parser though.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by M. Bean</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment2396</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment2396</guid>
			<pubDate>Fri, 11 Jul 2003 15:37:01 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Well, let's find out... &amp;amp;cap; is unescaped... and escaped, here it comes... wooo.... my heart is beating so quickly, I can't stand it! \&amp;amp;cap; Did it work?&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by M. Bean</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment2397</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment2397</guid>
			<pubDate>Fri, 11 Jul 2003 15:37:14 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Oh, no! DENIED.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment2399</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment2399</guid>
			<pubDate>Fri, 11 Jul 2003 18:38:11 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;Told you!&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Michael</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment11158</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment11158</guid>
			<pubDate>Wed, 20 May 2009 07:04:43 +0000</pubDate>
			<description>&lt;p class=&quot;st-markup&quot;&gt;I realise this is a very old post, but just to let you know that there is a problem with the last merge function.&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;$arr1[0] = 15;&lt;br /&gt;
$arr1[2] = 30;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;$arr2[1] = 45;&lt;br /&gt;
$arr2[3] = 60;&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;merge ($arr1, $arr2);&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;var_dump ($arr1);&lt;/p&gt;

&lt;p class=&quot;st-markup&quot;&gt;Will delete all the values in $arr1 and replace them with $arr2 due to &amp;quot;!array_key_exists(0, $a)&amp;quot; in the first &amp;quot;if&amp;quot; statement.&lt;/p&gt;

</description>
		</item>
		<item>
			<title>by Keith</title>
			<link>http://keithdevens.com/weblog/archive/2003/Jul/10/MergeTwoArraysV2#comment11159</link>
			<guid isPermaLink="false">http://keithdevens.com/weblog/4059#comment11159</guid>
			<pubDate>Wed, 20 May 2009 21:18:01 +0000</pubDate>
			<description>&lt;blockquote class=&quot;st-markup&quot;&gt;&lt;p&gt;Will delete all the values in $arr1 and replace them with $arr2 due to &amp;quot;!array_key_exists(0, $a)&amp;quot; in the first &amp;quot;if&amp;quot; statement.&lt;/p&gt;&lt;/blockquote&gt;

&lt;p class=&quot;st-markup&quot;&gt;Working as intended. It's meant to merge associative arrays, not normal arrays, and that's what the check is there for. Yes it's a kludge cause there's no sure way to know whether a PHP array is intended as an associative array or as a normal array.&lt;/p&gt;

</description>
		</item>
	</channel>
</rss>
