PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("mango", "apple", "pear", "peach");
$fruits = array_flip($fruits);
echo ($fruits[0]);

error
peach
0
mango

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$fname = array("Peter", "Ben", "Joe");
$age = array("35", "37", "43");
$c = array_combine($fname, $age);
print_r($c);

Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” )
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )
Array ( 35 37 43 )
Array ( Peter Ben Joe )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("apple", "mango", "peach", "pear", "orange");
$subset = array_slice ($fruits, 2);
print_r ($subset);

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

ANSWER DOWNLOAD EXAMIANS APP