Sr. PHP Programmer Question:

What is the difference between $var and $$var in PHP?

Tweet Share WhatsApp

Answer:

$$var sets the value of $var as a variable.

$day='monday';
$$day='first day of week';
echo $monday; //outputs 'first day of week'

Download Senior PHP Programmer PDF Read All 202 Senior PHP Programmer Questions
Previous QuestionNext Question
How do you load classes in PHP?How can we get the IP address of the client?