PHP Arrays What will be the output of the following PHP code?$names = array("Sam", "Bob", "Jack");echo $names[0] . "is the brother of " . $names[1] . " and " . $names[1] . ".".$brother; Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother Error Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother Error ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which array function checks if the specified key exists in the array? array_keys_exists() array_key_exists() arrays_key_exists() array_key_exist() array_keys_exists() array_key_exists() arrays_key_exists() array_key_exist() ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What function computes the difference of arrays? diff_arrays arrays_diff array_diff diff_array diff_arrays arrays_diff array_diff diff_array 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]); error mango 0 peach error mango 0 peach ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which in-built function will add a value to the end of an array? array_push() array_unshift() inend_array() into_array() array_push() array_unshift() inend_array() into_array() 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");$result = array_diff($a1, $a2);print_r($result); Array ( [a] => red ) Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [d] => yellow ) Array ( [a] => red ) Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [d] => yellow ) ANSWER DOWNLOAD EXAMIANS APP