Changes

Jump to: navigation, search

PHP Arrays

No change in size, 15:39, 1 June 2007
Create a PHP Array
Arrays are created using the ''array()'' function. The ''array()'' function takes zero or more arguments and 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 and 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.
We can create an empty array as follows:

Navigation menu