-
What will be the output of the following PHP code?
<?php
$Student = array("Rahul", "Ajit", "Ats");
echo $Student[0] . " is the friend of " . $Student[1] . " and " . $Student[2] . ".";
?>
-
- Rahul
- Error
- Rahul is the friend of Ajit and Ats.
- Nothing
- None of these
Correct Option: C
Simple definition of array and using it in a string. We have used $Student [1],$Student [1] and hence Ajit, Ats appears.