Hi Guys
This is an example of the use of variable variables:
Does this example look correct???
$myvar = "numbers";
$$myvar = array(1,2,3,4);
echo "<p>Varname :" .$myvar. "</p>";
echo "<p>Value:" .$$myvar. "</p>";
echo "<p>Item:". $numbers[1]. "</p>";
This is an example of the use of variable variables:
Does this example look correct???
$myvar = "numbers";
$$myvar = array(1,2,3,4);
echo "<p>Varname :" .$myvar. "</p>";
echo "<p>Value:" .$$myvar. "</p>";
echo "<p>Item:". $numbers[1]. "</p>";
Comment