title: explode associative array in php and adding two fields in the array
body: <p>output of form:</p>
  
  <pre><code>Array (
      [0] =&gt; (19.979802102871425,73.78671169281006)
      [1] =&gt; (19.97978382724978,73.78682289971039)
      [2] =&gt; (19.979765551626006,73.78697712672874) 
  )
  </code></pre>
  
  <p>expect output:</p>
  
  <pre><code>Array (
      [0] =&gt; 
            [lag]=&gt;19.979802102871425,
            [long]=&gt;73.78671169281006,   
      [1] =&gt; [lag]=&gt;19.97978382724978,
             [long]=&gt;73.78682289971039
      [2] =&gt; [lag]=&gt;19.979765551626006,
               [long]=&gt;73.78697712672874 
  )
  </code></pre>
  
  <p>following code working is not given me desired output as i am unaware of adding two associate element in array </p>
  
  <pre><code>   foreach($_POST['textbox'] as $value):
          $value = str_replace(array('(',')'), '',$value);
         foreach (explode(',', $value) as $topic) : 
             list($name, $items) =$topic;  
           ///stuck up here   
          }
               $test[] = explode(',', $value);
         endforeach;                            
       endforeach;
  </code></pre>
  
  <p>could please suggest the changes in the code as i reffered following links but the expected out is different from mine.thanks in advance 
  <a href="https://stackoverflow.com/questions/4017880/php-explode-and-put-into-array">php-explode-and-put-into-array</a>
  <a href="https://stackoverflow.com/questions/4500370/add-values-to-one-array-after-explode-function">explode-function</a></p>