on 12/23/03 11:04, John W. Holmes at [EMAIL PROTECTED] wrote: > Richard Baskett wrote: >> Ok I am trying to create a variable from the value of a variable plus some >> extra text tagged on the end of it. >> >> So for example: >> >> $test = '_over'; >> $$CONFIG['island'].$test = 'testing'; > > ${$CONFIG['island'].$test} = 'testing'; > >> echo "hawaii = $hawaii_over"; > > Why not just use an array for all of this? Almost every time variable > variables are used, it's a workaround to just using arrays. I don't know > why these even exist, honestly...
I might not be sure what you mean, about using an array for all of that, but within one line of code, it is taking care of a variable that will change depending on the config island variable. Otherwise I would have needed to use a switch statement, which is a whole lot more than just one variable. But then again if your array solution would work in one line.. then I would love to see it! Cheers! Rick "It is the mark of an educated mind to be able to entertain a thought without accepting it." - Aristotle -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php