note 117019 added to language.types.array
| From: | rahul.gmail.com | Date: | Thu, 02 Apr 2015 13:39:08 +0000 |
| Subject: | note 117019 added to language.types.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-202149@lists.php.net to get a copy of this message | ||
Associative Arrays
The associative arrays are very similar to numeric arrays in term of functionality but they are
different in terms of their index. Associative array will have their index as string so that you can
establish a strong association between key and values.
To store the salaries of employees in an array, a numerically indexed array would not be the best
choice. Instead, we could use the employees names as the keys in our associative array, and the
value would be their respective salary.
NOTE: Don't keep associative array inside double quote while printing otheriwse it would not
return any value.
----
Server IP: 72.52.91.14
Probable Submitter: 182.68.103.222
----
Manual Page -- http://php.net/manual/en/language.types.array.php
Edit -- https://master.php.net/note/edit/117019
Del: integrated -- https://master.php.net/note/delete/117019/integrated
Del: useless -- https://master.php.net/note/delete/117019/useless
Del: bad code -- https://master.php.net/note/delete/117019/bad+code
Del: spam -- https://master.php.net/note/delete/117019/spam
Del: non-english -- https://master.php.net/note/delete/117019/non-english
Del: in docs -- https://master.php.net/note/delete/117019/in+docs
Del: other reasons-- https://master.php.net/note/delete/117019
Reject -- https://master.php.net/note/reject/117019
Search -- https://master.php.net/manage/user-notes.php