Hi there...
general query for all you out there, I am looking at creating a new variable name that is constructed out of two other variable names.
for instance:
I have a set of variables called $value1, $value2 $value3 etc... that are automatically created by a for loop on a page, each $value(number) is asigned a value, [lets say 100].
ok got that 🙂
I submit those values to another page and I want to creat an array of all those variables, if I put in the following:
for($i = 0; $i < $how_many; $i++)
{
$value_array[$i] = $value1;
}
I can populate the array with the variable $value1 but I want to insert in to the next element $value2 and then $value3 (and so on)so I need to concatenate the ($value) and ($i+1) to create the variable name but if I create a new variable name like below
$variable = "\$value" . $i+1;
then the $variable will equal "$value1" (a string) not actually the instance of the $value1 as passed from the other table.
sigh ok... did that make sence???
any one know how to help?
If so Please do 🙂
Clive