Guided Notes

Arrays

Indexed, associative, and multidimensional arrays; adding, removing, and searching; sorting; and the most useful array functions.

Three kinds of array

Slide 1 / 5
KindExampleAccess
Indexed$colors = ['red', 'green']$colors[0]
Associative$user = ['name' => 'Ada', 'age' => 36]$user['name']
Multidimensional$matrix = [[1, 2], [3, 4]]$matrix[1][0]
← Functions