Examveda
Examveda

What will be the output of the following PHP code?
<?php
$names = array("Sam", "Bob", "Jack");
echo $names[0] . "is the brother of " . $names[1] . " and " . $names[1] . ".".$brother;
?>

A. Sam is the brother of Bob and Bob) $brother

B. Sam is the brother of Bob and Bob)

C. $brother

D. Error

Answer: Option D

Solution(By Examveda Team)

$brother undeclared.

This Question Belongs to PHP >> Arrays

Join The Discussion

Related Questions on Arrays