Vidyalelo
PHP · Q25

Operators And Expressions

Programming · PHP · question 25

Q25

What will be the output of the following PHP code ?

A.
My car is a Volvo
Answer
B.
My car is a BMW
C.
My car is a Toyota
D.
Error

Answer: Option A

Solution

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