title: Array merge if key not exists
body: <p>I tried merging two arrays if the key is not exists in the array but I cannot accomplish this. How can i do? This is what I have tried:</p>
  
  <pre><code>  array (size=3)  // name of the array $exchange
    'purchase' =&gt; string '1' (length=1)
    'agriculture' =&gt; string '1' (length=1)
  
   array (size=6)  // name of the array $fixed
    'purchase' =&gt; string '0' (length=1)
    'ICT' =&gt; string '0' (length=1)
    'agriculture' =&gt; string '0' (length=1)
    'entertainment' =&gt; string '0' (length=1)
    'goods and service' =&gt; string '0' (length=1)
    'other' =&gt; string '0' (length=1)
  
     foreach($fixed as $keys=&gt;$values){
  
      if(!in_array($values, $exchange, true)){
  
         array_push($exchange, $keys);
      }
     }
  </code></pre>
  
  <p>I get this result:</p>
  
  <pre><code> array (size=7)
   'ICT' =&gt; string '1' (length=1)
   0 =&gt; string 'purchase' (length=8)
   1 =&gt; string 'ICT' (length=3)
   2 =&gt; string 'agriculture' (length=11)
   3 =&gt; string 'entertainment' (length=13)
   4 =&gt; string 'goods and service' (length=17)
   5 =&gt; string 'other' (length=5)
  </code></pre>
  
  <p>But I want:</p>
  
  <pre><code> array (size=7)
   'ICT' =&gt; string '1' (length=1)
   'purchase' =&gt; string '0' (length=8)
   'agriculture' =&gt; string '0' (length=11)
   'entertainment' =&gt; string '0' (length=13)
   'goods and service' =&gt; string '0' (length=17)
   'other' =&gt; string '0' (length=5)
  </code></pre>