> -----Original Message-----
> From: Gerald Timothy Quimpo [mailto:[EMAIL PROTECTED]]
> Sent: 02 January 2003 14:12
>
> alternatively, if you don't want to change to array syntax,
> you can use
> variable variables. e.g.,
>
> $variable_name="comment_".nIndex; // now comment_1, for example.
> // assume that $comment_1 is "xxx111"
> echo $$variable_name ; // prints xxx111
echo ${'comment'.$nIndex}
works just as well.
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, visit: http://www.php.net/unsub.php