34,333
edits
Changes
→Create a PHP Array
== Create a PHP Array ==
Arrays are created using the ''array()'' function. ''array()'' function takes zero or more arguments and retruns returns the new array which must be assigned to a variable using the assigment operator. If arguments are provided they are used to initialize the array with data.
PHP arrays grow amd shrink dynamically as items are added and removed so it is not necessary to specify the array size at creation time as it is with some other programming languages.