Shared Flashcard Set

Details

Php
Common PHP arrays
11
Computer Science
Undergraduate 1
11/03/2010

Additional Computer Science Flashcards

 


 

Cards

Term
array_merge
Definition
array_merge (array1, array2, ...) Merges the elements of one or more arrays together so that the values of one are appended to the end of the previous one. It returns the resulting array.
Term
array_pop
Definition
array_pop (array) Pops and returns the last value of the array, shortening the array by one element. If array is empty (or is not an array), NULL will be returned.
Term
array_push
Definition
array_push (array, $var)Treats array as a stack, and pushes the passed variables onto the end of array. The length of array increases by the number of variables pushed.
Term
array_rand
Definition
array_rand (array) Useful when you want to pick one or more random entries out of an array.
Term
array_search
Definition
array_search (mixed $needle, array $haystack[, bool $strict ]) Searches the array for a given value and returns the corresponding key if successful, strict searches for identical. the first matching key is returned. To return the keys for all matching values, use array_keys() with the optional search_value parameter
Term
array_diff
Definition
array_diff ( array $array1 , array $array2 [, array $ ... ] ) Compares array1 against array2 and returns the difference.
Term
count
Definition
count ( mixed $var [, int $mode = COUNT_NORMAL ] ) Counts all elements in an array, or properties in an object. mode goes w multideminsionals
Term
in_array
Definition
in_array ( mixed $needle , array $haystack [, bool $strict ] ) Checks if a value exists in an array
Term
key
Definition
key (array) key() returns the index element of the current array position.
Term
sort
Definition
sort ( array &$array [, int $sort_flags = SORT_REGULAR ] ) Sorts an array. Elements will be arranged from lowest to highest when this function has completed. The optional second parameter sort_flags may be used to modify the sorting behavior using these values
Term
array_keys
Definition
array_keys( array $input [, mixed $search_value [, bool $strict = false ]] ) returns the keys, numeric and string, from the input array. If the optional search_value is specified, then only the keys for that value are returned. Otherwise, all the keys from the input are returned.
Supporting users have an ad free experience!