&lt;?php$a1 = array&#40;&quot;a&quot;=&gt;&quot;red&quot;, &quot;b&quot;=&gt;&quot;green&quot;, &quot;c&quot;=&gt;&quot;blue&quot;, &quot;d&quot;=&gt;&quot;yellow&quot;&#41;;$a2 = array&#40;&quot;e&quot;=&gt;&quot;red&quot;, &quot;f&quot;=&gt;&quot;green&quot;, &quot;g&quot;=&gt;&quot;blue&quot;&#41;;$result = array_diff&#40;$a1, $a2&#41;;print_r&#40;$result&#41;;?&gt;
A. Array ( [d] => yellow )
B. Array ( [c] => blue )
C. Array ( [a] => red )
D. Array ( [e] => yellow )
Answer:A
&lt;?php$a1 = array&#40;&quot;a&quot;=&gt;&quot;red&quot;, &quot;b&quot;=&gt;&quot;green&quot;, &quot;c&quot;=&gt;&quot;blue&quot;, &quot;d&quot;=&gt;&quot;yellow&quot;&#41;;$a2 = array&#40;&quot;e&quot;=&gt;&quot;red&quot;, &quot;f&quot;=&gt;&quot;green&quot;, &quot;g&quot;=&gt;&quot;blue&quot;&#41;;$result = array_diff&#40;$a1, $a2&#41;;print_r&#40;$result&#41;;?&gt;
A. Array ( [d] => yellow ) B. Array ( [c] => blue ) C. Array ( [a] => red ) D. Array ( [e] => yellow )
Explanation: The array_diff() function compares the values of two (or more) arrays, and returns the differences.