Multiple choice

In PHP, a variable is represented by a _____ sign followed by the name of variable.

  1. #

  2. $
  3. &

  4. none of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

PHP variables always begin with a dollar sign ($) followed by the variable name. This is a mandatory syntax - variables without $ are treated as constants or barewords, not variables.