PHP $ and $$ Variables

PHP $var variable is a normal variable that stores any value.

PHP $$var variable is a reference variable that stores the value of$var inside it.

Let us take an example.

Example 1

Output

Hello
100
100

Example 2

Output :

Rasmus
Rasmus
Rasmus

Leave a Comment