> -----Original Message-----
> From: Yoed [mailto:[EMAIL PROTECTED]]
> Sent: 10 January 2002 23:01
> 
> I never really found the trick to this one yet, and wanted to 
> see what you
> guys say is the best methods to call a variable that needs a variable.
> 
> Say I have variables called $Var_1_Stat, $Var_2_Stat, and $Var_3_Stat
> and I have a variable called $Nums thats value is either 1, 2, or 3.
> How then would I go about calling $Var_Call=$Var_$Num_Stat ? Or
> $Var_Call="$Var_$Num_State".... hmm not hat wouldn't work?
> So what do you guys suggest?

I suggest arrays -- is there a good reason why they won't do the job in this case?  If 
it were at all possible, I'd reformulate the algorithm using these variables so they 
could be $Var_Stat[$Nums] ($Var_Stat[1], $Var_Stat[2], etc.).

Cheers!

Mike

---------------------------------------------------------------------
Mike Ford,  Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS,  LS6 3QS,  United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730      Fax:  +44 113 283 3211 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to