note 12477 deleted from function.echo by jeroen
| From: | jeroen@php.net | Date: | Sat, 08 Sep 2001 22:32:11 +0000 |
| Subject: | note 12477 deleted from function.echo by jeroen | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17822@lists.php.net to get a copy of this message | ||
I added this with the array functions, but think it maybe should be here. Or both :).
i found out that multidemensional array's don't work that well with echo. At least, not
within quotes.
this doesn't work:
echo "$arrayname[1][name]";
while this does:
echo $arrayname[1][name];
And this is also no problem:
echo "$arrayname[name]";
(with another array, offcource).
It's not really a big problem, but it took me a long time to find this 'bug' in my
code.
[Editors note, you can also put the entire reference in curly braces, For example {arr[0][1]} Thanks
to eblade@blackmagik.dynup.net for this]