<?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/"
	xmlns:series="http://unfoldingneurons.com/"
		>
<channel>
	<title>Comments on: PHP State Drop Down Menu &#8211; Reusable Code!</title>
	<atom:link href="http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/</link>
	<description>web development, photography, tutorials and adventure</description>
	<lastBuildDate>Wed, 25 Aug 2010 05:58:24 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Form Design with CSS , PHP and Codeigniter Framework &#171; Yidea&#039;s Blog</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2774</link>
		<dc:creator>Form Design with CSS , PHP and Codeigniter Framework &#171; Yidea&#039;s Blog</dc:creator>
		<pubDate>Fri, 20 Aug 2010 18:53:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2774</guid>
		<description>&lt;p&gt;[...] USA state dropdown list [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] USA state dropdown list [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Preeti</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2773</link>
		<dc:creator>Preeti</dc:creator>
		<pubDate>Thu, 19 Aug 2010 11:39:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2773</guid>
		<description>&lt;p&gt;can anybody give me the detail code in php
after selecting item from dropdown it will display all related information from table i.e. present database.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>can anybody give me the detail code in php
after selecting item from dropdown it will display all related information from table i.e. present database.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Larry Zoumas</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2771</link>
		<dc:creator>Larry Zoumas</dc:creator>
		<pubDate>Tue, 17 Aug 2010 07:50:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2771</guid>
		<description>&lt;p&gt;Nice code Peter, you rock.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Nice code Peter, you rock.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Peter</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2757</link>
		<dc:creator>Peter</dc:creator>
		<pubDate>Tue, 29 Jun 2010 07:40:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2757</guid>
		<description>&lt;p&gt;I&#039;m pretty lazy, and I don&#039;t like to have to think, so I just threw this together... works like a charm. Simple &quot;for&quot; loop to select a state from an array...&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$state = &#039;CA&#039;; // the abbreviation is submitted with the form, not the full name

$states = Array(&#039;AL - Alabama&#039;, &#039;AK - Alaska&#039;, &#039;AZ - Arizona&#039;, &#039;AR - Arkansas&#039;, &#039;CA - California&#039;, &#039;CO - Colorado&#039;, &#039;CT - Connecticut&#039;, &#039;DE - Delaware&#039;, &#039;DC - District Of Columbia&#039;, &#039;FL - Florida&#039;, &#039;GA - Georgia&#039;, &#039;HI - Hawaii&#039;, &#039;ID - Idaho&#039;, &#039;IL - Illinois&#039;, &#039;IN - Indiana&#039;, &#039;IA - Iowa&#039;, &#039;KS - Kansas&#039;, &#039;KY - Kentucky&#039;, &#039;LA - Louisiana&#039;, &#039;ME - Maine&#039;, &#039;MD - Maryland&#039;, &#039;MA - Massachusetts&#039;, &#039;MI - Michigan&#039;, &#039;MN - Minnesota&#039;, &#039;MS - Mississippi&#039;, &#039;MO - Missouri&#039;, &#039;MT - Montana&#039;, &#039;NE - Nebraska&#039;, &#039;NV - Nevada&#039;, &#039;NH - New Hampshire&#039;, &#039;NJ - New Jersey&#039;, &#039;NM - New Mexico&#039;, &#039;NY - New York&#039;, &#039;NC - North Carolina&#039;, &#039;ND - North Dakota&#039;, &#039;OH - Ohio&#039;, &#039;OK - Oklahoma&#039;, &#039;OR - Oregon&#039;, &#039;PA - Pennsylvania&#039;, &#039;RI - Rhode Island&#039;, &#039;SC - South Carolina&#039;, &#039;SD - South Dakota&#039;, &#039;TN - Tennessee&#039;, &#039;TX - Texas&#039;, &#039;UT - Utah&#039;, &#039;VT - Vermont&#039;, &#039;VA - Virginia&#039;, &#039;WA - Washington&#039;, &#039;WV - West Virginia&#039;, &#039;WI - Wisconsin&#039;, &#039;WY - Wyoming&#039;);

$selected = &#039;&#039;;
for ($s=0;$s&lt;=50;$s++){ // let&#039;s not forget DC
    if ($state == $states[$s]){
        $selected = &#039; selected=&quot;selected&quot;&#039;;
    } else {
        $selected = &#039;&#039;;
    }
    $st = substr($states[$s], 0, 2);
    echo &#039;&#039; . $states[$s] . &#039;&#039;;
}
&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>I&#8217;m pretty lazy, and I don&#8217;t like to have to think, so I just threw this together&#8230; works like a charm. Simple &#8220;for&#8221; loop to select a state from an array&#8230;</p>

<pre><code>$state = 'CA'; // the abbreviation is submitted with the form, not the full name

$states = Array('AL - Alabama', 'AK - Alaska', 'AZ - Arizona', 'AR - Arkansas', 'CA - California', 'CO - Colorado', 'CT - Connecticut', 'DE - Delaware', 'DC - District Of Columbia', 'FL - Florida', 'GA - Georgia', 'HI - Hawaii', 'ID - Idaho', 'IL - Illinois', 'IN - Indiana', 'IA - Iowa', 'KS - Kansas', 'KY - Kentucky', 'LA - Louisiana', 'ME - Maine', 'MD - Maryland', 'MA - Massachusetts', 'MI - Michigan', 'MN - Minnesota', 'MS - Mississippi', 'MO - Missouri', 'MT - Montana', 'NE - Nebraska', 'NV - Nevada', 'NH - New Hampshire', 'NJ - New Jersey', 'NM - New Mexico', 'NY - New York', 'NC - North Carolina', 'ND - North Dakota', 'OH - Ohio', 'OK - Oklahoma', 'OR - Oregon', 'PA - Pennsylvania', 'RI - Rhode Island', 'SC - South Carolina', 'SD - South Dakota', 'TN - Tennessee', 'TX - Texas', 'UT - Utah', 'VT - Vermont', 'VA - Virginia', 'WA - Washington', 'WV - West Virginia', 'WI - Wisconsin', 'WY - Wyoming');

$selected = '';
for ($s=0;$s&lt;=50;$s++){ // let's not forget DC
    if ($state == $states[$s]){
        $selected = ' selected="selected"';
    } else {
        $selected = '';
    }
    $st = substr($states[$s], 0, 2);
    echo '' . $states[$s] . '';
}
</code></pre>]]></content:encoded>
	</item>
	<item>
		<title>By: Daniel</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2462</link>
		<dc:creator>Daniel</dc:creator>
		<pubDate>Tue, 25 Aug 2009 16:09:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2462</guid>
		<description>&lt;p&gt;Thanks again, nice to find a quick help via Google.&lt;/p&gt;

&lt;p&gt;@Sara, your array is in alphabetical order by state code, the posted array code is in alphabetical order by actual state name... so it depends on which part you display to as to which one you should use.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks again, nice to find a quick help via Google.</p>

<p>@Sara, your array is in alphabetical order by state code, the posted array code is in alphabetical order by actual state name&#8230; so it depends on which part you display to as to which one you should use.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2374</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 08 Jun 2009 01:56:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2374</guid>
		<description>&lt;p&gt;cool.. this will save me time. thanks.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>cool.. this will save me time. thanks.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Sara</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2360</link>
		<dc:creator>Sara</dc:creator>
		<pubDate>Tue, 26 May 2009 23:34:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2360</guid>
		<description>&lt;p&gt;Thanks for the arrays...just an FYI that your states array was not in alphabetical order.  Here is the updated array in the right order:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;$states_arr = array(&#039;AK&#039;=&gt;&quot;Alaska&quot;,&#039;AL&#039;=&gt;&quot;Alabama&quot;,&#039;AR&#039;=&gt;&quot;Arkansas&quot;,&#039;AZ&#039;=&gt;&quot;Arizona&quot;,&#039;CA&#039;=&gt;&quot;California&quot;,&#039;CO&#039;=&gt;&quot;Colorado&quot;,&#039;CT&#039;=&gt;&quot;Connecticut&quot;,&#039;DC&#039;=&gt;&quot;District Of Columbia&quot;,&#039;DE&#039;=&gt;&quot;Delaware&quot;,&#039;FL&#039;=&gt;&quot;Florida&quot;,&#039;GA&#039;=&gt;&quot;Georgia&quot;,&#039;HI&#039;=&gt;&quot;Hawaii&quot;,&#039;IA&#039;=&gt;&quot;Iowa&quot;,&#039;ID&#039;=&gt;&quot;Idaho&quot;,&#039;IL&#039;=&gt;&quot;Illinois&quot;, &#039;IN&#039;=&gt;&quot;Indiana&quot;,&#039;KS&#039;=&gt;&quot;Kansas&quot;,&#039;KY&#039;=&gt;&quot;Kentucky&quot;,&#039;LA&#039;=&gt;&quot;Louisiana&quot;,&#039;MA&#039;=&gt;&quot;Massachusetts&quot;,&#039;MD&#039;=&gt;&quot;Maryland&quot;,&#039;ME&#039;=&gt;&quot;Maine&quot;,&#039;MI&#039;=&gt;&quot;Michigan&quot;,&#039;MN&#039;=&gt;&quot;Minnesota&quot;,&#039;MO&#039;=&gt;&quot;Missouri&quot;,&#039;MS&#039;=&gt;&quot;Mississippi&quot;,&#039;MT&#039;=&gt;&quot;Montana&quot;,&#039;NC&#039;=&gt;&quot;North Carolina&quot;,&#039;ND&#039;=&gt;&quot;North Dakota&quot;,&#039;NE&#039;=&gt;&quot;Nebraska&quot;,&#039;NH&#039;=&gt;&quot;New Hampshire&quot;,&#039;NJ&#039;=&gt;&quot;New Jersey&quot;,&#039;NM&#039;=&gt;&quot;New Mexico&quot;,&#039;NV&#039;=&gt;&quot;Nevada&quot;,&#039;NY&#039;=&gt;&quot;New York&quot;,&#039;OH&#039;=&gt;&quot;Ohio&quot;,&#039;OK&#039;=&gt;&quot;Oklahoma&quot;, &#039;OR&#039;=&gt;&quot;Oregon&quot;,&#039;PA&#039;=&gt;&quot;Pennsylvania&quot;,&#039;RI&#039;=&gt;&quot;Rhode Island&quot;,&#039;SC&#039;=&gt;&quot;South Carolina&quot;,&#039;SD&#039;=&gt;&quot;South Dakota&quot;,&#039;TN&#039;=&gt;&quot;Tennessee&quot;,&#039;TX&#039;=&gt;&quot;Texas&quot;,&#039;UT&#039;=&gt;&quot;Utah&quot;,&#039;VA&#039;=&gt;&quot;Virginia&quot;,&#039;VT&#039;=&gt;&quot;Vermont&quot;,&#039;WA&#039;=&gt;&quot;Washington&quot;,&#039;WI&#039;=&gt;&quot;Wisconsin&quot;,&#039;WV&#039;=&gt;&quot;West Virginia&quot;,&#039;WY&#039;=&gt;&quot;Wyoming&quot;);
&lt;/code&gt;&lt;/pre&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the arrays&#8230;just an FYI that your states array was not in alphabetical order.  Here is the updated array in the right order:</p>

<pre><code>$states_arr = array('AK'=&gt;"Alaska",'AL'=&gt;"Alabama",'AR'=&gt;"Arkansas",'AZ'=&gt;"Arizona",'CA'=&gt;"California",'CO'=&gt;"Colorado",'CT'=&gt;"Connecticut",'DC'=&gt;"District Of Columbia",'DE'=&gt;"Delaware",'FL'=&gt;"Florida",'GA'=&gt;"Georgia",'HI'=&gt;"Hawaii",'IA'=&gt;"Iowa",'ID'=&gt;"Idaho",'IL'=&gt;"Illinois", 'IN'=&gt;"Indiana",'KS'=&gt;"Kansas",'KY'=&gt;"Kentucky",'LA'=&gt;"Louisiana",'MA'=&gt;"Massachusetts",'MD'=&gt;"Maryland",'ME'=&gt;"Maine",'MI'=&gt;"Michigan",'MN'=&gt;"Minnesota",'MO'=&gt;"Missouri",'MS'=&gt;"Mississippi",'MT'=&gt;"Montana",'NC'=&gt;"North Carolina",'ND'=&gt;"North Dakota",'NE'=&gt;"Nebraska",'NH'=&gt;"New Hampshire",'NJ'=&gt;"New Jersey",'NM'=&gt;"New Mexico",'NV'=&gt;"Nevada",'NY'=&gt;"New York",'OH'=&gt;"Ohio",'OK'=&gt;"Oklahoma", 'OR'=&gt;"Oregon",'PA'=&gt;"Pennsylvania",'RI'=&gt;"Rhode Island",'SC'=&gt;"South Carolina",'SD'=&gt;"South Dakota",'TN'=&gt;"Tennessee",'TX'=&gt;"Texas",'UT'=&gt;"Utah",'VA'=&gt;"Virginia",'VT'=&gt;"Vermont",'WA'=&gt;"Washington",'WI'=&gt;"Wisconsin",'WV'=&gt;"West Virginia",'WY'=&gt;"Wyoming");
</code></pre>]]></content:encoded>
	</item>
	<item>
		<title>By: sivagami</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-2327</link>
		<dc:creator>sivagami</dc:creator>
		<pubDate>Mon, 16 Mar 2009 07:08:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-2327</guid>
		<description>&lt;p&gt;how i submit my dateof birth into table in mysql.
i am using function for to select date through dropdown box. &lt;/p&gt;

&lt;p&gt;i have to combine this three field drop down seleted date month year into table. please reply me. i use this following coding but it doesn&#039;t work. anybosdy reply me.&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>how i submit my dateof birth into table in mysql.
i am using function for to select date through dropdown box. </p>

<p>i have to combine this three field drop down seleted date month year into table. please reply me. i use this following coding but it doesn&#8217;t work. anybosdy reply me.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Zend Form U.S. state drop down select menu &#124; The Disgruntled Developer</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-1716</link>
		<dc:creator>Zend Form U.S. state drop down select menu &#124; The Disgruntled Developer</dc:creator>
		<pubDate>Mon, 10 Nov 2008 21:33:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-1716</guid>
		<description>&lt;p&gt;[...] Here&#8217;s a link to a helpful blog post with common PHP arrays: http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/ [...]&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>[...] Here&#8217;s a link to a helpful blog post with common PHP arrays: <a href="http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/" rel="nofollow">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/</a> [...]</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Mark</title>
		<link>http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/comment-page-1/#comment-1555</link>
		<dc:creator>Mark</dc:creator>
		<pubDate>Sun, 02 Nov 2008 02:19:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.ninedays.org/2008/01/03/php-state-drop-down-menu-reusable-code/#comment-1555</guid>
		<description>&lt;p&gt;Thanks for the arrays.&lt;/p&gt;

&lt;p&gt;m&lt;/p&gt;
</description>
		<content:encoded><![CDATA[<p>Thanks for the arrays.</p>

<p>m</p>]]></content:encoded>
	</item>
</channel>
</rss>
