March 2016
Beginner
414 pages
9h 29m
English
If you have some experience with other programming languages or data structures in general, you might be aware of two data structures that are very common and useful: lists and maps. A list is an ordered set of elements, whereas a map is a set of elements identified by keys. Let's see an example:
List: ["Harry", "Ron", "Hermione"]
Map: {
"name": "James Potter",
"status": "dead"
}The first element is a list of names that contains three values: Harry, Ron, and Hermione. The second one is a map, and it defines two values: James Potter and dead. Each of these two values is identified with a key: name and status respectively.
In PHP, we do not have lists and maps; we have arrays. An array is a data structure that implements both, a list and a ...
Read now
Unlock full access