<?xml version="1.0" encoding="utf-8" ?><rss version="2.0" xml:base="https://www.webmaster-forums.net/crss/node/1021988" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title></title>
    <link>https://www.webmaster-forums.net/crss/node/1021988</link>
    <description></description>
    <language>en</language>
          <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/eeknot-handling-array-right#comment-1135549</link>
    <description> &lt;p&gt;Glad you figured it out! &lt;img src=&quot;https://www.webmaster-forums.net/misc/smileys/smile.png&quot; title=&quot;Smiling&quot; alt=&quot;Smiling&quot; class=&quot;smiley-content&quot; /&gt;&lt;/p&gt;
 </description>
     <pubDate>Mon, 04 Aug 2003 04:31:23 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1135549 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/eeknot-handling-array-right#comment-1135548</link>
    <description> &lt;p&gt;figured it out.. the selected value is treated as a string, so i needed == instead of ===&lt;/p&gt;
&lt;p&gt;since i know this is useful to turn associative arrays into option code, i think i&#039;ll send it to php.net and see if they wanna add it. i&#039;m sure those doing forms with associative arrays that want memory have already written functions, but hey, who knows...one second thought i don&#039;t see how and most problaby already have that. so... unless you people want to encourage me i&#039;m going ot give up on that&lt;/p&gt;
 </description>
     <pubDate>Mon, 04 Aug 2003 04:28:06 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1135548 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/eeknot-handling-array-right#comment-1135547</link>
    <description> &lt;p&gt;now the test file looks like&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;include(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;/home/joshua/includes/fyd.incs.php\&quot;); # includes file&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$month&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;month&#039;];&lt;br /&gt;if(!isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$month&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)){&lt;br /&gt;&amp;nbsp; echo &amp;lt;&amp;lt;&amp;lt;END&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form action=\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;PHP_SELF&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot; method=\&quot;POST\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=\&quot;text\&quot; name=\&quot;month\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=\&quot;submit\&quot; value=\&quot;check\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;END;&lt;br /&gt;}else{&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=array(&#039;00&#039;=&amp;gt;&#039;Month&#039;, &#039;01&#039;=&amp;gt;&#039;January&#039;, &#039;02&#039;=&amp;gt;&#039;February&#039;, &#039;03&#039;=&amp;gt;&#039;March&#039;,&lt;br /&gt; &#039;04&#039;=&amp;gt;&#039;April&#039;, &#039;05&#039;=&amp;gt;&#039;May&#039;, &#039;06&#039;=&amp;gt;&#039;June&#039;, &#039;07&#039;=&amp;gt;&#039;July&#039;,&lt;br /&gt; &#039;08&#039;=&amp;gt;&#039;August&#039;, &#039;09&#039;=&amp;gt;&#039;September&#039;, &#039;10&#039;=&amp;gt;&#039;October&#039;, &#039;11&#039;=&amp;gt;&#039;November&#039;, &#039;12&#039;=&amp;gt;&#039;December&#039;);&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=\&quot;&#039;month&#039;\&quot;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=array_to_options(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp; echo &#039;&amp;lt;select name=\&quot;test\&quot; size=\&quot;1\&quot;&amp;gt;&#039;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.&#039;&amp;lt;/select&amp;gt;&#039;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;the function looks like&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;array_to_options&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$selected&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;){&lt;br /&gt;&amp;nbsp; echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;in ato, selected: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$selected&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;; array: &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; &amp;lt;br /&amp;gt;\&quot;; # debug&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&#039;&#039;; # make an empty string&lt;br /&gt;&amp;nbsp; foreach(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$selected&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;===&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){&lt;br /&gt; # if this is the first time it wont match, so we don&#039;t need to care if it&#039;s set&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.\&quot;&amp;lt;option value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; selected&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/option&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.\&quot;&amp;lt;option value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/option&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;and the output was&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;in ato, selected: 12; array: Array &amp;lt;br /&amp;gt;&amp;lt;select name=&amp;quot;test&amp;quot; size=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;00&amp;quot;&amp;gt;Month&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;01&amp;quot;&amp;gt;January&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;02&amp;quot;&amp;gt;February&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;03&amp;quot;&amp;gt;March&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;04&amp;quot;&amp;gt;April&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;05&amp;quot;&amp;gt;May&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;06&amp;quot;&amp;gt;June&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;07&amp;quot;&amp;gt;July&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;08&amp;quot;&amp;gt;August&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;09&amp;quot;&amp;gt;September&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;10&amp;quot;&amp;gt;October&amp;lt;/option&amp;gt;&amp;lt;option value=&amp;quot;11&amp;quot;&amp;gt;November&amp;lt;/option&amp;gt;&lt;br /&gt;&amp;lt;option value=&amp;quot;12&amp;quot;&amp;gt;December&amp;lt;/option&amp;gt;&amp;lt;/select&amp;gt;&lt;/code&gt;&lt;/div&gt;&#039;&lt;/p&gt;
 </description>
     <pubDate>Mon, 04 Aug 2003 04:24:45 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1135547 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/eeknot-handling-array-right#comment-1135545</link>
    <description> &lt;p&gt;I have trouble with $variable and $_POST[&#039;variable&#039;] -- they are the same thing. Perhaps set $thismonth=$_POST[&#039;month&#039;]?&lt;/p&gt;
 </description>
     <pubDate>Mon, 04 Aug 2003 02:55:41 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1135545 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/eeknot-handling-array-right#comment-1135544</link>
    <description> &lt;p&gt;i realized that.[blush]&lt;br /&gt;
 yes i am trying to get a string. =. doesn&#039;t seem to work. that made an error.&lt;br /&gt;
but $optlist=$optlist.&quot;$value&quot;;&lt;br /&gt;
does work.. to some extent.&lt;br /&gt;
the default selected thing doesn&#039;t seem to work&lt;br /&gt;
new code:&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;array_to_options&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;){&lt;br /&gt;&amp;nbsp; echo \&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;in ato, feild name &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;; method &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;; array &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; &lt;br /&gt;&amp;lt;br /&amp;gt; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;] &amp;lt;br /&amp;gt;\&quot;; # debug&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&#039;&#039;; # make an empty string&lt;br /&gt;&amp;nbsp; foreach(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){ &lt;br /&gt;# if this is the first time it wont match, so we don&#039;t need to care if it&#039;s set&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.\&quot;&amp;lt;option value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; selected&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/option&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }else{&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.\&quot;&amp;lt;option value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/option&amp;gt;\&quot;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; }&lt;br /&gt;&amp;nbsp; return &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$optlist&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;and&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;include(\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;/home/joshua/includes/fyd.incs.php\&quot;); # includes file&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$month&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;month&#039;];&lt;br /&gt;if(!isset(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$month&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;)){&lt;br /&gt;&amp;nbsp; echo &amp;lt;&amp;lt;&amp;lt;END&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;html&amp;gt;&amp;lt;head&amp;gt;&amp;lt;/head&amp;gt;&amp;lt;body&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;form action=\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_SERVER&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;PHP_SELF&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;\&quot; method=\&quot;post\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=\&quot;text\&quot; name=\&quot;month\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;input type=\&quot;submit\&quot; value=\&quot;check\&quot;&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/form&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/body&amp;gt;&amp;lt;/html&amp;gt;&lt;br /&gt;END;&lt;br /&gt;}else{&lt;br /&gt;&amp;nbsp; /* array&amp;nbsp; dropped from here &amp;amp; chopped up to stop scrolling */&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=array(&#039;00&#039;=&amp;gt;&#039;Month&#039;, &#039;01&#039;=&amp;gt;&#039;January&#039;, &#039;02&#039;=&amp;gt;&#039;February&#039;, &#039;03&#039;=&amp;gt;&#039;March&#039;, &lt;br /&gt;&#039;04&#039;=&amp;gt;&#039;April&#039;, &#039;05&#039;=&amp;gt;&#039;May&#039;, &#039;06&#039;=&amp;gt;&#039;June&#039;, &#039;07&#039;=&amp;gt;&#039;July&#039;, &lt;br /&gt;&#039;08&#039;=&amp;gt;&#039;August&#039;, &#039;09&#039;=&amp;gt;&#039;September&#039;, &#039;10&#039;=&amp;gt;&#039;October&#039;, &#039;11&#039;=&amp;gt;&#039;November&#039;, &#039;12&#039;=&amp;gt;&#039;December&#039;);&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&#039;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$_POST&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&#039;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=\&quot;&#039;month&#039;\&quot;;&lt;br /&gt;&amp;nbsp; &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=array_to_options(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;);&lt;br /&gt;&amp;nbsp; echo &#039;&amp;lt;select name=\&quot;test\&quot; size=\&quot;1\&quot;&amp;gt;&#039;.&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$list&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;.&#039;&amp;lt;/select&amp;gt;&#039;;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;generates&lt;br /&gt;
&lt;blockquote class=&quot;bb-quote-body&quot;&gt;Quote: in ato, feild name &#039;month&#039;; method $_POST; array Array  $_POST[&#039;month&#039;] MonthJanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember&lt;/blockquote&gt;&lt;/p&gt;
&lt;p&gt;it should have gotten the value of 12 since that&#039;s what i typed in&lt;/p&gt;
 </description>
     <pubDate>Mon, 04 Aug 2003 02:05:42 +0000</pubDate>
 <dc:creator>m3rajk</dc:creator>
 <guid isPermaLink="false">comment 1135544 at https://www.webmaster-forums.net</guid>
  </item>
  <item>
    <title></title>
    <link>https://www.webmaster-forums.net/serverside-scripting/eeknot-handling-array-right#comment-1135541</link>
    <description> &lt;p&gt;$optlist is an array, though, not a string variable?&lt;/p&gt;
&lt;p&gt;If you want it to be a string variable, remove the []. ?? &lt;/p&gt;
&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;&lt;span style=&quot;color: #000000&quot;&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;&amp;lt;?php&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;function &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;array_to_options&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;, &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;){&lt;br /&gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;_echo &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;in ato, feild name &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;; method &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;; array &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; &amp;lt;br /&amp;gt;&lt;br /&gt;&lt;br /&gt; &lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;{$&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;}&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;] &amp;lt;br /&amp;gt;\&quot;; # debug&lt;br /&gt;&lt;br /&gt;_foreach(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$array&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt; as &lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;=&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){&lt;br /&gt;&lt;br /&gt;____if(&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$method&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;[&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$feild_name&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;]&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;==&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;){ &lt;br /&gt;&lt;br /&gt;# if this is the first time it wont match, so we don&#039;t need to care if it&#039;s set&lt;br /&gt;&lt;br /&gt;______echo \&quot;&amp;lt;option value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot; selected&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/option&amp;gt;\&quot;;&lt;br /&gt;&lt;br /&gt;____}else{&lt;br /&gt;&lt;br /&gt;______echo \&quot;&amp;lt;option value=\\&quot;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$key&lt;/span&gt;&lt;span style=&quot;color: #007700&quot;&gt;\\&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&quot;&amp;gt;&lt;/span&gt;&lt;span style=&quot;color: #0000BB&quot;&gt;$value&lt;/span&gt;&lt;span style=&quot;color: #DD0000&quot;&gt;&amp;lt;/option&amp;gt;\&quot;;&lt;br /&gt;&lt;br /&gt;____}&lt;br /&gt;&lt;br /&gt;__}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;?&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;
&lt;p&gt;Or use =. to run them all together?&lt;/p&gt;
 </description>
     <pubDate>Mon, 04 Aug 2003 00:48:08 +0000</pubDate>
 <dc:creator>Suzanne</dc:creator>
 <guid isPermaLink="false">comment 1135541 at https://www.webmaster-forums.net</guid>
  </item>
  </channel>
</rss>
