Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.
$tempvar = 'secondhalf';
$foo.$tempvar = "This is the value that will be put in the var '$foosecondhalf'.";
print "$foosecondhalf"; //would print "This is the value that will be put in the var '$foosecondhalf'."
it has to do with how the variables are replaced and sorted out.. $foo.$tempvar concatenates the string results of 2 variables and returns a string, where mine, concatenates the two into a string before the variable part is hooked.. so a string is passed to the first $ there thus creating the variable.
I've been wondering if there was a way to do this... I found this posted on the variable variables link you put up Feyd. Good practical example of Variable Variables. This takes post variables and names the variable the key name (with a prefix) and assigns its value to it. Great way of going from $_POST['some_variable']="blah" to $some_variable = "blah"... etc....