Key-value manipulation functions for arrays
("Key Name" = "Key value")
Array_keys ();//Returns all the key names of the array in parentheses
Array_values ()//returns all the key values of the array in parentheses
In_array ("Key value", array);
Search for the key values in that array
Array_key_exists ("Key name", array);
Check if the key name is in that array
Array_flip ();//Swap the key name and value of the array in parentheses
Array_reverse ();//returns an array in reverse order
Elements and uniqueness of a statistical array
Count ();//Returns the number of elements in the array within parentheses
Array_count_values ();//statistics on values in an array
Array_unique ();//delete duplicate values in the array
Functions for working with arrays using callback functions
Array_filter (Array, "callback function");//filter elements in an array with callback functions
Array_map ("function", array);//Use a function to change each value in an array
Reference parameters
Requirements: Array values are added from 1
function Add (& $arr) {
foreach ($arr as $key = = $val) {
$arr [$key]= $val +1;
}
}
Sorting Functions for arrays
Sort ();//ascending does not retain key
Rsort ();//descending does not retain key
Asort ();//L Reserve key
Arsort ();//drop-hold Key
Ksort ();//L key sort
Krsort ();//Descending key sort
Natsort ();//Natural number sort
Natcasesort ();//Ignore case natural number sort
Array_multisort ();//Most Group sort
php-Array Operations