Function | Details |
Creating an Array | How to create and assign keys |
array_change_key_case() | Changing keys to upper case or lower case chars |
array_chunk() | Split an array into chunks |
array_column() | Displaying one column data of an array |
array_combine() | Creating array with Keys of one and values of another array |
array_count_values | calculate the frequency of occurrence of elements inside a array |
Displaying elements | Listing all elements of the array |
array_diff | We can generate a resultant third array by differentiating two arrays |
array_diff_assoc | Resultant third array by differentiating two arrays considering Keys |
array_diff_uassoc | Resultant third array by differentiating values and (keys through callback function) |
array_diff_ukey | Resultant third array by comparing keys through callback function |
array_udiff | Resultant third array by comparing values through callback function |
array_diff_key | We can generate a resultant third array by differentiating two arrays by considering keys only |
array_fill_keys | Create array by filling keys and value |
array_fill | Filling an array with value |
array_filter() | Creating new array using filter ( callback ) function |
array_intersect_assoc() | Intersection of arrays considering keys and values |
array_intersect() | Intersection of arrays considering values only |
array_intersect_key() | Intersection of arrays considering keys only |
array_intersect_uassoc() | Intersection of arrays considering keys & values through callback function |
array_intersect_ukey() | Intersection of arrays considering keys through callback function |
in_array | Check the presence of an element inside an array. Returns True of False |
is_array | To check the variable is array or not |
array_size() | How many elements are present inside the array? We can find out by count or sizeof() function. |
array_keys() | Returns Array of keys of a main array |
array_key_exists() | Search Key, returns TRUE if found, FALSE otherwise |
array_key_first() | Getting first key of the array ( >= PHP 7.3.0 ) |
array_key_last() | Getting last key of the array ( >= PHP 7.3.0 ) |
array_push | add elements to an existing array |
array_max() | Maximum minimum value present inside array |
array_merge | add one array to other by using array_merge |
array_merge_recursive() | Merge one or more arrays recursively |
array_pop | Removing last element of an array |
array_rand | Randomly collecting elements of an array |
array_range | Create array using a range with optional step value |
array_search | Returns the key if matching found, FALSE otherwise |
array_shift | Remove first element of an array |
array_sum | Total value or sum of the elements present inside an array |
array_shuffle | randomizes the order of the elements of an array |
Breaking string | We can split a string and create a array by using all words. |
Session array | create a session array and carry same data across the pages. |
Sorting | Sorting all elements of an array by sort command |
usort | sort the elements by using user defined function. |
array_map | apply native functions or user defined function to each elements |
array_unshift | Adding element at beginning of an array |
array_unique | set of unique value from an array |
unset | Delete elements by using key or value |
array_walk() | Passing user defined function to each element of an array |
Multidimensional Array | Creating and displaying elements of Multidimensional array |
Array checkbox | Getting checkbox value using array |
http_build_query | generate query string using elements to pass through URL |
Function | Details |
Current | Present Element of the array |
Next | Next Element of the array |
Previous | Previous Element of the array |
end | Last Element of the array |
reset | First Element of the array |