September 2001
Intermediate to advanced
768 pages
32h 45m
English
int array_push(array array, mixed vars, mixed ...)
| array | Array to which to add the new value(s) |
| vars | Value to append to array |
| ... | Further values to add |
Appends the list of mixed variables onto the given array.
Returns:
Number of elements appended to the array; NULL on failure
Description:
This function appends one or more values to the array given by array . All values beyond the first are appended. Any type of variable can be appended, including mixed or multidimensional arrays. New elements will always have incrementally-increased numeric keys in array , and the new elements will be added in the order in which they are passed to array_push().
This function can be used with array_pop() to treat arrays as stacks.
Warning:
Read now
Unlock full access