-
What will be the output of the following PHP code?
<?php
$num = array ("2","3","4", "5", "6", "7", "8", "9", "10");
$face = array ("A", "J", "Q", "K");
$cards = array_merge ($face, $num);
print_r ($cards);
?>
-
-
Array
(
[0] => A
[1] => J
[2] => Q
[3] => K
) -
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
(
[4] => 2
[5] => 3
[6] => 4
[7] => 5
[8] => 6
[9] => 7
[10] => 8
[11] => 9
[12] => 10
) -
Array
(
[2] => Q
[3] => K
[4] => 2
[5] => 3
[6] => 4
[7] => 5
[8] => 6
) - None of these
-
Correct Option: B
The resulting array will begin with the first input array parameter, appending each subsequent array parameter in the order of appearance.