Concatenation
Posted: Fri Sep 06, 2002 8:39 am
I need to concatenate this into a variable... any ideas as to how?
Here is the scenario:
The end var name needs to be
if the current base number is unit 1.
The current base number is determined by a var that is passed through the header called $base_number, in this case $base_number is 1
so here is the general idea but it gives a parse error. I understand why but I do not know how to correct it.
another var gets set to this so in the end it needs to look something like this:
Direwolf
Here is the scenario:
The end var name needs to be
Code: Select all
$n_unit1_lengthThe current base number is determined by a var that is passed through the header called $base_number, in this case $base_number is 1
so here is the general idea but it gives a parse error. I understand why but I do not know how to correct it.
Code: Select all
eval("$n_unit".$base_number."_length")Code: Select all
$m_pan_center=eval("$n_unit".$base_number."_length")