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

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

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$number = range(0, 5);
print_r ($number);

Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 )
Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
Array ( [0] => 0 [5] => 5 )
Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$a1 = array("red", "green");
$a2 = array("blue", "yellow");
$a3 = array_merge($a1, $a2);
$a4 = array("a", "b", "c", "d");
$a = array_combine($a4, $a3);
print_r($a);

Array ( [a] => red [b] => green [c] => blue [d] => yellow )
Array ( [0] => blue [1] => yellow [2] => red [3] => green )
Array ( [a] => blue [b] => yellow [c] => red [d] => green )
Array ( [0] => red [1] => green [2] => blue [3] => yellow )

ANSWER DOWNLOAD EXAMIANS APP