RE: [PHP] Associative Array key funkyness
| From: | Boget, Chris | Date: | Fri, 28 Jul 2000 21:12:04 +0000 |
| Subject: | RE: [PHP] Associative Array key funkyness | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-8856@lists.php.net to get a copy of this message | ||
> Outside of a string, $foo[bar] is an invalid syntax. PHP
> recognizes it, though, and warns you about this with an
> E_NOTICE warning. Whether or not this warning is
> displayed, depends on your error_reporting settings.
So, while it is invalid, it still works because PHP understands
what you mean by it, correct? So if you have the reporting
settings low enough you don't get a warning, but are there
other repurcussions to doing things like this? I do this all the
time, both in assigning and displaying data and I just want
to make sure I'm not causing any underlying problems...
Chris