note 69958 added to language.types.array

From: Date: Wed, 27 Sep 2006 21:18:47 +0000
Subject: note 69958 added to language.types.array
Groups: php.notes 
Request: Send a blank email to php-notes+get-117754@lists.php.net to get a copy of this message
Regarding the fact that there's no need to quote arrays keys when enclosed in double quotes: it only applies to single dimensional arrays. The following works fine: <?php $r['a'] = 'apple'; echo "$r[a] is tasty."; ?> ...but in the case of multi-dimensional arrays: <?php $r['a']['b'] = 'banana'; echo "$r[a][b] is tasty."; ?> would result in "Array[c] is tasty." ---- Server IP: 216.235.15.211 Probable Submitter: 24.84.32.31 ---- Manual Page -- http://www.php.net/manual/en/language.types.array.php Edit -- https://master.php.net/note/edit/69958 Del: integrated -- https://master.php.net/note/delete/69958/integrated Del: useless -- https://master.php.net/note/delete/69958/useless Del: bad code -- https://master.php.net/note/delete/69958/bad+code Del: spam -- https://master.php.net/note/delete/69958/spam Del: non-english -- https://master.php.net/note/delete/69958/non-english Del: in docs -- https://master.php.net/note/delete/69958/in+docs Del: other reasons-- https://master.php.net/note/delete/69958 Reject -- https://master.php.net/note/reject/69958 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#117754) next »