PHP Arrays
What will be the output of the following PHP code?
$a = array("red", "green", "blue");
array_pop($a);
print_r($a);

Array ( [0] => red [1] => blue )
Array ( [0] => blue [1] => blue )
Array ( [0] => green [1] => blue )
Array ( [0] => red [1] => green )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$arr = array ("picture1.JPG", "picture2.jpg", "Picture10.jpg", "picture20.jpg");
sort($arr);
print_r($arr);

Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture20.jpg [3] => picture2.jpg )
Array ( [0] => picture1.JPG [1] => picture2.jpg [2] => Picture10.jpg [3] => picture20.jpg )
Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture2.jpg [3] => picture20.jpg )
Array ( [0] => picture1.JPG [1] => Picture10.jpg [2] => picture2.jpg [3] => picture20.jpg )

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] => apple [1] => mango [2] => peach )
Array ( [0] => peach [1] => pear [2] => orange )
Array ( [0] => apple [1] => mango )
Array ( [0] => peach )

ANSWER DOWNLOAD EXAMIANS APP