Examveda
Examveda

What will be the output of the following PHP code ?
<?php
$cars = array("Volvo", "BMW", "Toyota");
print $cars[2];
?>

A. Volvo

B. BMW

C. Toyota

D. Error

Answer: Option C

Solution(By Examveda Team)

Print statement can be used to output a specific array member.

This Question Belongs to PHP >> Operators And Expressions In Php

Join The Discussion

Related Questions on Operators and Expressions in php