$include=$$includevar; <--what does the double $$ mean?
$$includevar is resolved by php to a variable which name is the value of $includevar. So, if $includevar is set to include0, $include will get the value of a variable named $include0 . This syntax is useful if you e.g. wanna output the value of some vari basing on some user input.
There's a similar syntax for function calls:
$var = "test";
$var();
will try to call the function "test"
Hope that helps, if not, check out the variable section in the php manual.