Term
Array
Meaning
An array is an ordered collection of values that you can reach by number or by name. A list of city names uses numbers as keys, while an associative array uses names, such as email and phone for one user record. Arrays are everywhere in PHP: form data, database rows and configuration are all handled as arrays, and the foreach loop is designed to walk through them one item at a time. Learning arrays well makes most beginner projects, such as a marks calculator, much easier. See also: Data type, Variable, and the guide PHP Variables, Data Types and Control Flow for Beginners.