PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("mango", "apple", "peach", "pear");
$fruits = asort ($fruits);
printr ($fruits);

Array ( [1] => apple [0] => mango [2] => peach [3] => pear )
Array ( [1] => apple [0] => mango [3] => peach [2] => pear )
Error
Array ( [0] => apple [1] => mango [2] => peach [3] => pear )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$result = array_flip($a1);
print_r($result);

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

ANSWER DOWNLOAD EXAMIANS APP