Difference Between $ and $$ in php
$name (single dollar) is a simple variable which is used to store string, integer, float etc..
$$name (double dollar) is a reference variable that store the variable with single dollar ($name) value inside it.
To understand this difference let’s take an example.
<?php $name = "Infojackers"; $$name = "Checkout new blogs post."; echo $name."<br>"; echo $$name."<br>"; echo $infojackers; ?>
//OUTPUT OF ABOVE PROGRAM……
// Infojackers // Checkout new blogs post. // Checkout new blogs post.