Q16
What will be the output of the following PHP code?
A.
Sam is the brother of Bob and Jack
B.
Sam is the brother of Bob and Bob)
AnswerC.
Sam is the brother of Jack and Bob)
D.
Error
Answer: Option B
Solution
Answer: Option B
Solution:
Simple definition of array and using it in a string. We have used $names[1] twice and hence Bob appears twice.