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] . “.”;
?>
a) I like Volvo BMW and Toyota.
b) I like Volvo, BMW and Toyota)
c) I like Volvo, BMW and Toyota.
d) I like. Volvo.,. BMW. and. Toyota)
Answer: b
Explanation: The array() function is used to create an array. Each elements are assigned ab index as the rule of an array. So, calling $cars[0] will print element at index 0 and so on.
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