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

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

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$face = array ("A", "J", "Q", "K");
$number = array ("2","3","4", "5", "6", "7", "8", "9", "10");
$cards = array_merge ($face, $number);
print_r ($cards);

Error
Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 )
Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K )
Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
There are three different kind of arrays:

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

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$place = array("NYC", "LA", "Paris");
array_pop($place);
$place1 = array("Paris");
$place = array_merge($place, $place1);
print_r($place);

Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris )
None of the mentioned
Array ( [0] => LA [1] => Paris [2] => Paris )
Array ( [0] => NYC [1] => LA [2] => Paris)

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