PHP Arrays
What will be the output of the following PHP code?
$fruits = array ("apple", "orange", "banana");
echo (next($fruits));
echo (next($fruits));

orangeorange
appleapple
appleorange
orangebanana

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

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What array will you get if you convert an object to an array?

An array with keys of that object as the array's elements
An array with properties of that object as the array's elements
An array with properties of that array as the object's elements
An array with properties of that object as the Key elements

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");
$result = array_flip($a1);
print_r($result);

Array ( [red] => a [green] => b [blue] => c [yellow] => d )
Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
Array ( [a] => a [b] => b [c] => c [d] => d )
Array ( [a] => red [b] => green [c] => blue [d] => yellow )

ANSWER DOWNLOAD EXAMIANS APP