<?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: Using PHP to generate select boxes</title>
	<atom:link href="http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/feed/" rel="self" type="application/rss+xml" />
	<link>http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/</link>
	<description>the personal blog of Stuart Colville covering modern web development techniques and best practices</description>
	<lastBuildDate>Thu, 09 Feb 2012 02:58:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Stuart Colville</title>
		<link>http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/comment-page-1/#comment-65286</link>
		<dc:creator>Stuart Colville</dc:creator>
		<pubDate>Wed, 19 Aug 2009 23:36:46 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/#comment-65286</guid>
		<description>@Julie - I&#039;ve updated the script to quote the keys</description>
		<content:encoded><![CDATA[<p>@Julie &#8211; I&#8217;ve updated the script to quote the keys</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Julie</title>
		<link>http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/comment-page-1/#comment-65282</link>
		<dc:creator>Julie</dc:creator>
		<pubDate>Tue, 18 Aug 2009 22:49:44 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/#comment-65282</guid>
		<description>Great script!! I too would love to see the code that builds the value-option multi-dimensional array so I can tweak it. The problem with the existing array output is there needs to be quotes around the array keys:

currently generates:
$multi = array(AF =&gt; &quot;Afghanistan&quot;, AL =&gt; &quot;Albania&quot;, DZ =&gt; &quot;Algeria&quot;, AD =&gt; &quot;Andorra&quot;);

correct PHP array syntax should be:
$multi = array(&quot;AF&quot; =&gt; &quot;Afghanistan&quot;, &quot;AL&quot; =&gt; &quot;Albania&quot;, &quot;DZ&quot; =&gt; &quot;Algeria&quot;, &quot;AD&quot; =&gt; &quot;Andorra&quot;);

For the most part it would still work but in my case trying to use an array of countries causes a syntax error on country codes &quot;AS&quot; and &quot;DO&quot; because PHP doesn&#039;t see them as strings and tries to interpret them as commands.</description>
		<content:encoded><![CDATA[<p>Great script!! I too would love to see the code that builds the value-option multi-dimensional array so I can tweak it. The problem with the existing array output is there needs to be quotes around the array keys:</p>
<p>currently generates:<br />
$multi = array(AF =&gt; &#8220;Afghanistan&#8221;, AL =&gt; &#8220;Albania&#8221;, DZ =&gt; &#8220;Algeria&#8221;, AD =&gt; &#8220;Andorra&#8221;);</p>
<p>correct PHP array syntax should be:<br />
$multi = array(&#8220;AF&#8221; =&gt; &#8220;Afghanistan&#8221;, &#8220;AL&#8221; =&gt; &#8220;Albania&#8221;, &#8220;DZ&#8221; =&gt; &#8220;Algeria&#8221;, &#8220;AD&#8221; =&gt; &#8220;Andorra&#8221;);</p>
<p>For the most part it would still work but in my case trying to use an array of countries causes a syntax error on country codes &#8220;AS&#8221; and &#8220;DO&#8221; because PHP doesn&#8217;t see them as strings and tries to interpret them as commands.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Karl</title>
		<link>http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/comment-page-1/#comment-64317</link>
		<dc:creator>Karl</dc:creator>
		<pubDate>Fri, 09 May 2008 18:38:19 +0000</pubDate>
		<guid isPermaLink="false">http://muffinresearch.co.uk/archives/2004/12/12/using-php-to-generate-select-boxes/#comment-64317</guid>
		<description>Thanks for the code to convert an array to a select list, but could you post the function you use to convert the selectbox  to the value-option pairs MD array (Selectbox Converter) used via the form? THAT is what I really need.

Thanks!

http://muffinresearch.co.uk/code/php/select2array/</description>
		<content:encoded><![CDATA[<p>Thanks for the code to convert an array to a select list, but could you post the function you use to convert the selectbox  to the value-option pairs MD array (Selectbox Converter) used via the form? THAT is what I really need.</p>
<p>Thanks!</p>
<p><a href="http://muffinresearch.co.uk/code/php/select2array/" rel="nofollow">http://muffinresearch.co.uk/code/php/select2array/</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

