referer to a variable from a string [SOLVED]
Posted: Fri Jan 06, 2006 9:03 am
Hi,
I would like to know if there is a way to referer to an already instantiated variable by using a string..
for example
there is a variable named $brokerName = 'The Name';
and i have a variable names $name = 'broker';
can i get the value of $brokerName by saying echo eval("$".$name.'Name');
?
Kendall
I would like to know if there is a way to referer to an already instantiated variable by using a string..
for example
there is a variable named $brokerName = 'The Name';
and i have a variable names $name = 'broker';
can i get the value of $brokerName by saying echo eval("$".$name.'Name');
?
Kendall