http://www.php.net/manual/en/function.constant.php
$msg = constant('_LANG'.$num);
HTH, -- Jason k Larson
Vincent M. wrote:
Hello,
I do a lot of define like that: define ("_LANG1", "Server options"); define ("_LANG1", "Manage your system"); etc...
And stuff like that: if($num == 1) { $mgs = _LANG1 ; }else if($num == 2) { $mgs = _LANG2 ; } etc...
But I do want to avoid all these if and else, is there a way to do something like that:
$mgs = _LANG.$num ;
?
Thanks.
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php