note 11856 deleted from ref.array.php by ronabop
| From: | ronabop@php.net | Date: | Sat, 10 Mar 2001 21:42:43 +0000 |
| Subject: | note 11856 deleted from ref.array.php by ronabop | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-12180@lists.php.net to get a copy of this message | ||
Named indices for arrays:
$arr[bla] == $arr['bla'] == $arr["bla"]
notice the first syntax.
echo "The value of $arr['bla'] is $arr['bla']"
won't work (very strange error by the way)
echo "The value of $arr['bla'] is $arr[bla]"
WILL work on the other hand. Be warned.
(this is totally undocumented in the manual: the need/unneed for " and ' with
array-indices.)