5
PHP 5.5, JOOMLA, WORDPRESS, DRUPAL, MAGENTO, CAKE PHP, ZEND
PHP CMS AND FRAMEWORKS
What is an Array?
Array is a memory allocation which is used to
store multiple data in a sequential memory
location with unique indexes.
With other programming language references
array is a collection of similar data types. But in
PHP we can store any data type in a single array.
Because in PHP we do not need to declare data
type before array initialization.
g!"
#data $ array%&'( )'( ).*( +php+,-
Here #data is an array which contain different
data types
.ypes of Array
Associati3e Array
4ultidimensional Array
Ad3antage of Array in PHP
array%,
print6r%,
min%,
max%,
current%,
next%,
pre3%,
Array 5unctions
array6sum%,
array6unique%,
array6re3erse%,
array6push%,
array6pad%,
array6shift%,
array6unshift%,
Array 5unctions
/ort%,
rsort%,
asort%,
arsort%,
7sort%,
7rsort%,
u7sort%,
Array 5unctions
array67ey6exists%,
in6array%,
array6diff%,
array6diff6assoc%,
array6unique%,
array6merge%,
array6combine%,