What will be the output of the following PHP code? <?php $a = array("red", "green", "blue"); array_pop($a); print_r($a); ?> a) Array ( ...
View Question
What will be the output of the following PHP code?
<?php
$a = array(“a”=>”red”, “b”=>”green”, “c”=>”blue”);
echo array_shift($a);
print_r ($a);
?>
What will be the output of the following PHP code? <?php $a = array("a"=>"red", "b"=>"green", "c"=>"blue"); echo array_shift($a); print_r ($a); ?> a) ...
View Question
What will be the output of the following PHP code?
<?php
$a1 = array(“red”, “green”);
$a2 = array(“blue”, “yellow”);
print_r(array_merge($a1, $a2));
?>
What will be the output of the following PHP code? <?php $a1 = array("red", "green"); $a2 = array("blue", "yellow"); print_r(array_merge($a1, $a2)); ?> a) ...
View Question
What will be the output of the following PHP code?
<?php
$a1 = array_fill(3, 4, “blue”);
$b1 = array_fill(0, 1, “red”);
print_r($a1);
echo “<br>”;
print_r($b1);
?>
What will be the output of the following PHP code? <?php $a1 = array_fill(3, 4, "blue"); $b1 = array_fill(0, 1, "red"); print_r($a1); echo ...
View Question
What will be the output of the following PHP code?
<?php
$a1 = array(“a”=>”red”, “b”=>”green”, “c”=>”blue”, “d”=>”yellow”);
$a2 = array(“e”=>”red”, “f”=>”green”, “g”=>”blue”);
$result = array_diff($a1, $a2);
print_r($result);
?>
What will be the output of the following PHP code? <?php $a1 = array("a"=>"red", "b"=>"green", "c"=>"blue", "d"=>"yellow"); $a2 = array("e"=>"red", "f"=>"green", ...
View Question
What will be the output of the following PHP code?
<?php
$a = array(“A”, “Cat”, “Dog”, “A”, “Dog”);
print_r(array_count_values($a));
?>
What will be the output of the following PHP code? <?php $a = array("A", "Cat", "Dog", "A", "Dog"); print_r(array_count_values($a)); ?> a) ...
View Question
What will be the output of the following PHP code?
<?php
$fname = array(“Peter”, “Ben”, “Joe”);
$age = array(“35”, “37”, “43”);
$c = array_combine($fname, $age);
print_r($c);
?>
What will be the output of the following PHP code? <?php $fname = array("Peter", "Ben", "Joe"); $age = array("35", "37", "43"); $c ...
View Question
What will be the output of the following PHP code?
<?php
$cars = array(“Volvo”, “BMW”, “Toyota”, “Honda”, “Mercedes”, “Opel”);
print_r(array_chunk($cars, 2));
?>
What will be the output of the following PHP code? <?php $cars = array("Volvo", "BMW", "Toyota", "Honda", "Mercedes", "Opel"); print_r(array_chunk($cars, 2)); ?>
View Question
What will be the output of the following PHP code?
<?php
$age = array(“Peter”=>”35”, “Ben”=>”37”, “Joe”=>”43”);
print_r(array_change_key_case($age, CASE_UPPER));
?>
What will be the output of the following PHP code? <?php $age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43"); print_r(array_change_key_case($age, CASE_UPPER)); ?> a) ...
View Question
What will be the output of the following PHP code?
<?php
$cars = array(“Volvo”, “BMW”, “Toyota”);
echo “I like ” . $cars[0] . “, ” . $cars[1] . ” and ” . $cars[2] . “.”;
?>
What will be the output of the following PHP code? <?php $cars = array("Volvo", "BMW", "Toyota"); echo "I like " . ...
View Question