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] . ".";

Sam is the brother of Bob and Jack
Sam is the brother of Bob and Bob)
Sam is the brother of Jack and Bob)
Error

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$array1 = array ("KA", "LA", "CA", "MA", "TA");
$array2 = array ("KA", "IA", "CA", "GA", "TA");
$inter = array_intersect ($array1, $array2);
print_r ($inter);

Array ( [0] => KA [2] => CA [4] => TA )
Array ( [1] => IA [3] => GA )
Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA )
Array ( [1] => LA [3] => MA )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
There are three different kind of arrays:

Numeric array, Associative array, Dimensional array
Const array, Associative array, Multidimensional array
Numeric array, String array, Multidimensional array
Numeric array, Associative array, Multidimensional array

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 ( 35 37 43 )
Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” )
Array ( Peter Ben Joe )
Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 )

ANSWER DOWNLOAD EXAMIANS APP