<?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: Creating a States Table in MySQL</title>
	<atom:link href="http://www.tech-evangelist.com/2008/06/02/mysql-states-table/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-evangelist.com/2008/06/02/mysql-states-table/</link>
	<description>Technical Articles, Musings and Opinions from Tech-Evangelist</description>
	<lastBuildDate>Sun, 29 Jan 2012 19:09:23 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=</generator>
	<item>
		<title>By: D.Shaun Morgan</title>
		<link>http://www.tech-evangelist.com/2008/06/02/mysql-states-table/comment-page-1/#comment-22586</link>
		<dc:creator>D.Shaun Morgan</dc:creator>
		<pubDate>Mon, 25 Jul 2011 17:58:31 +0000</pubDate>
		<guid isPermaLink="false">http://www.tech-evangelist.com/2008/06/02/mysql-states-table/#comment-22586</guid>
		<description>Below is cleaner version of this code this code. It is still the same code but by putting your html elements into a variable allows the desiger much flexibility with the code.


&lt;option value=&quot;0&quot;&gt; 
- state not selected -
&lt;?php
$sql = &quot;SELECT state_code, state_name FROM states ORDER BY state_code&quot;;
$rs = mysql_query($sql);
 
while($row = mysql_fetch_array($rs))
{
$options =&quot;&quot;.$row[&#039;state_code&#039;].&quot; - &quot;.$row[&#039;state_name&#039;].&quot;\n &quot;;
}
?&gt; 
$options  = implode($options);


&lt;select name=&quot;state&quot;&gt; 

&lt;option value=&quot;0&quot;&gt; 
- state not selected -
echo $options;

&lt;/select&gt;</description>
		<content:encoded><![CDATA[<p>Below is cleaner version of this code this code. It is still the same code but by putting your html elements into a variable allows the desiger much flexibility with the code.</p>
<p>&lt;option value=&#8221;0&#8243;&gt;<br />
- state not selected -<br />
&lt;?php<br />
$sql = &#8220;SELECT state_code, state_name FROM states ORDER BY state_code&#8221;;<br />
$rs = mysql_query($sql);</p>
<p>while($row = mysql_fetch_array($rs))<br />
{<br />
$options =&#8221;".$row['state_code'].&#8221; &#8211; &#8220;.$row['state_name'].&#8221;\n &#8220;;<br />
}<br />
?&gt;<br />
$options  = implode($options);</p>
<p>&lt;select name=&#8221;state&#8221;&gt; </p>
<p>&lt;option value=&#8221;0&#8243;&gt;<br />
- state not selected -<br />
echo $options;</p>
<p>&lt;/select&gt;</p>
]]></content:encoded>
	</item>
</channel>
</rss>

