note 25155 deleted from language.types.array by jmcastagnetto
| From: | jmcastagnetto@php.net | Date: | Thu, 12 Sep 2002 19:01:24 +0000 |
| Subject: | note 25155 deleted from language.types.array by jmcastagnetto | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-36594@lists.php.net to get a copy of this message | ||
.. just getting into using the $$variablename method, e.g.
<?php
$somestring = "goes";
$kuh = "cow";
$i = '5';
$variablename = $somestring . "moo" . $kuh;
//$$variablename will now point to $goesmoocow, fair enough.
//but, $$variablename[$i] will not work.
//to echo out the 4th element of $goesmoocow, you need to put
echo ${$variablename}[$i];
?>
Anthony