1.

What will be the output of the following PHP code ?
  <?php $a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow"); $a2 = array("e" => "red","f" => "green", "g" => "blue"); $result = array_intersect($a1, $a2); print_r($result); ?>  

A. Array ( [a] =&gt; red [b] =&gt; green [c] =&gt; blue )
B. Array ( [a] =&gt; red [b] =&gt; green [c] =&gt; blue [d] =&gt; yellow )
C. Array ( [e] =&gt; red [f] =&gt; green [g] =&gt; blue )
D. Array ( [a] =&gt; red [b] =&gt; green [c] =&gt; blue [d] =&gt; yellow [e] =&gt; red [f] =&gt; green [g] =&gt; blue )
Answer» B. Array ( [a] =&gt; red [b] =&gt; green [c] =&gt; blue [d] =&gt; yellow )


Discussion

No Comment Found