How would I do this correctly...
$var1 = "value"; $var2$var1 = "value2";
So, the 2nd variable would come out as $var2value
How would I do this?
Thanks, Chris
it's very ugly, but try this:
$var1 = "value"; ${'var2'.$var1} = "value2"; echo $var2value;
using only slightly different syntax:
<?php $var1 = 'a'; $var2 = 'b'; $ab = 'foo'; ${"{$var1}{$var2}"} = 'bar'; echo $ab; ?>
well this may look horrible.. but at least this very bad php code is better than normal perl code