Vidyalelo
PHP · Q22

Basic PHP

Programming · PHP · question 22

Q22

What will be the output of the following PHP code?

A.
What is her age? n She is $num years old
Answer
B.
What is her age? She is $num years old
C.
What is her age? She is 10 years old
D.
What is her age?n She is 10 years old

Answer: Option A

Solution

Answer: Option A
Solution:
When a string is enclosed within single quotes both variables and escape sequences will not be interpreted when the string is parsed.