<?php
$var1="James ";
$var2="Bond";
function galaxy()
{
print $GLOBALS["$var1"];
}
galaxy();
?>
When I am accessing above script its generating following messages..
Notice: Undefined variable: var1 in C:\Xitami\paddyhtdocs\test1.php on line 15
Notice: Undefined index: in C:\Xitami\paddyhtdocs\test1.php on line 15
Please help.