title: Error imploding $_POST[] array containing php variable
body: <p>I am trying to implode an array in a $_POST[]. I am doing this inside of a loop which searches for values in ~31 arrays...$_POST['1'], $_POST['2'], $_POST['3'], etc.</p>
  
  <p>I am trying to do this with:</p>
  
  <pre><code>while($i &lt;= $_SESSION['daysInMonth']){
  
  $month = $_SESSION['month'];
  $day = $i;
  $names = implode(',',$_POST['names_'.$i]);
  $region = $_SESSION['region'];
  $date = date("Y").'-'.$month.'-'.$day;
  
  echo("$names");
  
  $i++;
  </code></pre>
  
  <p>}</p>
  
  <p>I am receiving the following error, though: </p>
  
  <p>Warning: implode() [function.implode]: Invalid arguments passed in /home/content/r/e/s/reslife4/html/duty/schedule.php  on line 15</p>
  
  <p>This is how I create the $_POST[] variables:</p>
  
  <pre><code>&lt;?php $i=1; while($i &lt;= $daysInMonth){?&gt;
              &lt;table align="center" style="width: 435px"&gt;
                  &lt;tr&gt;
                      &lt;td class="style1"&gt;&lt;p&gt;&lt;select name="names_&lt;?php echo($i); ?&gt;[]" multiple="multiple"&gt;
                      &lt;?php foreach($email_array as $arr){ ?&gt;
                          &lt;option&gt;&lt;?php echo($arr); ?&gt;&lt;/option&gt;
                      &lt;?php } ?&gt;
                      &lt;/select&gt;&lt;/p&gt;&lt;/td&gt;
                  &lt;/tr&gt;
              &lt;/table&gt;
  &lt;?php $i++; }?&gt;
  </code></pre>
  
  <p>Can anyone see what I am doing wrong?</p>
  
  <p>Thanks!</p>