Sail E0 Webinar
Question
Which statement will output $x on the screen?
Options:
A .  echo \$x";
B .  echo $$x";
C .  echo /$x";
D .  echo $x;
Answer: Option B


A backslash is used so that the dollar sign is treated as a normal string character rather than prompt PHP to treat $x as a variable. The backslash used in this manner is known as escape character.



Was this answer helpful ?
Next Question

Submit Solution

Your email address will not be published. Required fields are marked *

Latest Videos

Latest Test Papers