title: php array value repeated for each key
body: <p>I have an multidimensional array made from database query and is like that:</p>
  
  <pre><code>Array
  (
      [0] =&gt; Array
          (
              [0] =&gt; -8.63296022565696
              [x] =&gt; -8.63296022565696
              [1] =&gt; 41.1584289069069
              [y] =&gt; 41.1584289069069
              [2] =&gt; 0
              [seq] =&gt; 0
              [3] =&gt; 2
              [seq2] =&gt; 2
              [4] =&gt; -8.63306031211831
              [next_x] =&gt; -8.63306031211831
              [5] =&gt; 41.1584543235506
              [next_y] =&gt; 41.1584543235506
              [6] =&gt; -8.64195115878864
              [alert_x] =&gt; -8.64195115878864
              [7] =&gt; 41.1599295066425
              [alert_y] =&gt; 41.1599295066425
              [8] =&gt; 54e728edafac1
              [route] =&gt; 54e728edafac1
              [9] =&gt; 54e728edafac1
              [routeid] =&gt; 54e728edafac1
              [10] =&gt; 2
              [counttargetinter] =&gt; 2
              [11] =&gt; passeio
              [type] =&gt; passeio
              [12] =&gt; 1355
              [arcid] =&gt; 1355
          )
  </code></pre>
  
  <p>All the values are repeated because have a key number and a key name.
   Example: The value <code>'-8.63296022565696'</code> are in key <code>"0"</code> and <code>"X"</code>.</p>
  
  <p>How I can remove the duplicated?</p>
  
  <p>This is how i made the array:</p>
  
  <pre><code>$query = "SELECT * FROM foo;";
  $startRows =  pg_query($connection, $query);
  $startInfo = array();   
  while($list = pg_fetch_array($startRows)) {
      $startInfo[] = $list;
  }
  </code></pre>