I'm not familiar enough with this sort of thing to understand why someone would use that code, however ...
The double dollar signs are used to create variable variables. That is, dynamically named variables. For example ..
$var1 = "hi";
$$var1 = "there";
Basically, what this does is take the value of $var1-(hi) and create another variable using it's text. So ... after doing that, you now have a new variable called $hi. Therefore ...
echo $var1." ".$hi; // will output ... hi there
Like I said, I'm not sure why someone would use the code you supplied, but I THINK there is probably additional code which you didn't include that would be required for your code to make more sense.
Hope that helps.