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);
?>
a) Array ( [3] => blue [4] => blue)
Array ( [0] => red )
b) Array ( [4] => blue [5] => blue [6] => blue)
Array ( [0] => red )
c) Array ( [3] => blue [4] => blue [5] => blue [6] => blue )
Array ()
d) Array ( [3] => blue [4] => blue [5] => blue [6] => blue )
Array ( [0] => red )
Answer: d
Explanation: The array_fill() function fills an array with values.
Related Posts
___________ is a function of the particular enterprise and application in an on-premises deployment.
Cloud ________ are standardized in order to appeal to the majority of its audience.
The reputation for cloud computing services for the quality of those services is shared by _________
Network bottlenecks occur when ______ data sets must be transferred.
Which of the following captive area deals with monitoring?
Point out the wrong statement.
Security methods such as private encryption, VLANs and firewalls comes under __________ subject area
Join The Discussion