Mailinglisten-Archive |
> Hi,
>
> ich hab da mal ein kleines verstaendnisproblem mit arrays bei
> variablen variablen:
>
> $otto="hallo";
> $hallo="huhu";
> echo $$otto."<br>";
>
> ist kein problem - es wird "huhu" ausgegeben.
>
> Was aber wenn $hallo ein array ist?
>
> $otto="hallo[1]";
> $hallo[1]="huhu";
> echo $$otto."<br>";
>
Versuchs mit:
$otto="hallo";
$hallo[1]="huhu";
echo ${$otto}[1]."<br>";
Gruß
Boris
php::bar PHP Wiki - Listenarchive