Q:

What will be the output of the following PHP code ?

0

What will be the output of the following PHP code ?

<?php
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$result = array_flip($a1);
print_r($result);
?>

  1. Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
  2. Array ( [a] => a [b] => b [c] => c [d] => d )
  3. Array ( [red] => a [green] => b [blue] => c [yellow] => d )
  4. Array ( [a] => red [b] => green [c] => blue [d] => yellow )

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 (c).Array ( [red] => a [green] => b [blue] => c [yellow] => d )

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now