Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://old.hcs.cmc.msu.ru/php/function.array.html
Дата изменения: Sun Feb 3 22:34:05 2002 Дата индексирования: Mon Oct 1 21:06:42 2012 Кодировка: |
Returns an array of the parameters. The parameters can be given an index with the => operator.
Note: array() is a language construct used to represent literal arrays, and not a regular function.
Syntax "index => values", separated by commas, define index and values. index may be of type string or numeric. When index is omitted, a integer index is automatically generated, starting at 0. If index is an integer, next generated index will be the biggest integer index + 1. Note that when two identical index are defined, the last overwrite the first.
The following example demonstrates how to create a two-dimensional array, how to specify keys for associative arrays, and how to skip-and-continue numeric indices in normal arrays.
This example creates a 1-based array.
See also array_pad(), list(), and range().