PHP Arrays What will be the output of the following PHP code ?$people = array("Peter", "Susan", "Edmund", "Lucy");echo pos($people); Susan Edmund Lucy Peter Susan Edmund Lucy Peter ANSWER DOWNLOAD EXAMIANS APP
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 ( [0] => apple [1] => mango [2] => peach [3] => pear ) Array ( [1] => apple [0] => mango [3] => peach [2] => pear ) Error Array ( [1] => apple [0] => mango [2] => peach [3] => pear ) Array ( [0] => apple [1] => mango [2] => peach [3] => pear ) Array ( [1] => apple [0] => mango [3] => peach [2] => pear ) Error ANSWER DOWNLOAD EXAMIANS APP
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]); peach error mango 0 peach error mango 0 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");$a2 = array("e" => "red", "f" => "green", "g" => "blue", "h" => "orange");$a3 = array("i" => "orange");$a4 = array_combine($a2, $a3);$result = array_diff($a4, $a2);print_r($result); Array ( [d] => yellow ) Array ( [h] => orange ) Array ( [i] => orange ) Array ( [d] => yellow [h] => orange ) Array ( [d] => yellow ) Array ( [h] => orange ) Array ( [i] => orange ) Array ( [d] => yellow [h] => orange ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$cars = array("Volvo", "BMW", "Toyota", "Honda", "Mercedes", "Opel");print_r(array_chunk($cars, 2)); Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) ) Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) ) Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$city_west = array("NYC", "London");$city_east = array("Mumbai", "Beijing");print_r(array_replace($city_west, $city_east)); Array ( [0] => Mumbai [1] => Beijing ) Array ( [1] => Mumbai [0] => Beijing ) Array ( [1] => NYC [0] => London ) Array ( [0] => NYC [1] => London ) Array ( [0] => Mumbai [1] => Beijing ) Array ( [1] => Mumbai [0] => Beijing ) Array ( [1] => NYC [0] => London ) Array ( [0] => NYC [1] => London ) ANSWER DOWNLOAD EXAMIANS APP