note 4381 deleted from Variable variables by ronabop
| From: | ronabop@php.net | Date: | Sat, 19 Aug 2000 03:28:05 +0000 |
| Subject: | note 4381 deleted from Variable variables by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-2598@lists.php.net to get a copy of this message | ||
I found that exploding a VV (variable variable) into a VV and trying to print an element of the
array (i.e. - print ("${$explodedvar}[0]"); ) did not work. I had to take the $temp
variable one step further and explode into a variable ($explodedvar) then define the VV =
$explodedvar
eg -
<PRE>$varexplode = explode("-","${$var}");
${$varexploded} = $varexplode[0]; </PRE>
Is there a way to avoid the 2nd line? Thanks,
Joe