ExamVeda
Login
Home
Operators and Expressions in php
?

What will be the output of the following PHP code ?
<?php
$cars = array("Volvo", "BMW", "Toyota");
echo "My car is a {$cars[0]}";
?>

Answer & Solution
Correct Answer: Option A
In the echo statement the {$cars[0]} is replaced by the 1st element in cars that is Volvo.
Examveda
Question posted by Examveda
Community

Join the Discussion

No comments yet Be the first to discuss this question.