title: Passing array to form as hidden "key" is lost
body: <p>This is my array</p>
  
  <pre><code>$array = array('foo' =&gt; 'bar', 'baz', 'bat' =&gt; 2);
  
  
  
  &lt;form method='POST' action='test.php' onsubmit='return validateForm()' &gt;
  echo '&lt;input type="hidden" name="array" value= "'.implode(',', $array).'"&gt;';
  echo "&lt;&lt;input type='submit' name='Submit'  value='submit' /&gt;";
  echo '&lt;/form&gt;';
  
  
  $arry = explode(',', $_POST['array']);
  </code></pre>
  
  <p>I am getting key as <code>0,1,2</code>. Which should be "foo", "baz", "bat".</p>
  
  <p>How can I get correct key?</p>