| Term | Definition |
|
print_r($array) |
print array |
|
array_push($pasta, 'tagliatelle') |
add new item to array |
|
array_pop($pasta) |
remove last item from array |
|
array_shift($pasta) |
remove first (top) item from array |
|
array_unshift($pasta, 'tagliatelle') |
add an item to the begining of the array |
|
explode(', ', $str) |
split the $str string to small strings by del ',' |
|
$array = array ('a', 'b', 'c') |
define an array |
|
implode(' and ', $colors) |
join all the items in array $colors into one string with del 'and' |
|
rsort ($array) |
sort item alphabeticly reveresed |
|
sizeof($artists) |
get size of array |
|
array_keys($array); |
return the array keys into an array |
|
array_values($array) |
return the array values into an array |
|
foreach ($array as $item) { ... } |
iterate on an array |
|
is_array($var) |
check if $var is an array |
|
array_unique($array) |
remove duplicated from array |
|
trim() |
strip whitespace |