title: How to add keys to php array?
body: <pre><code>$c=array("a"=&gt;"blue","b"=&gt;"green");
  array_push($c,$c["d"]="red");
  print_r($c);
  </code></pre>
  
  <p>this code adding the key in to an array. But it also adding the indexed key to same key/value pair..how to avoid this indexed key?
  output:</p>
  
  <pre><code>Array
  (
      [a] =&gt; blue
      [b] =&gt; green
      [d] =&gt; red
      [0] =&gt; red
  )
  </code></pre>