Vidyalelo
PHP · Q13

Basic PHP

Programming · PHP · question 13

Q13

What will be the output of the following PHP code?

A.
a
B.
Error
C.
$var
D.
r
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
PHP treats strings in the same fashion as arrays, allowing for specific characters to be accessed via array offset notation.