PHP Array Functions List

  1. array_change_key_case — Returns an array with all string keys lowercased or uppercased
  2. array_chunk — Split an array into chunks
  3. array_count_values — Counts all the values of an array
  4. array_diff_assoc — Computes the difference of arrays with additional index check
  5. array_diff — Computes the difference of arrays
  6. array_fill — Fill an array with values
  7. array_filter — Filters elements of an array using a callback function
  8. array_flip — Exchanges all keys with their associated values in an array
  9. array_intersect_assoc — Computes the intersection of arrays with additional index check
  10. array_intersect — Computes the intersection of arrays
  11. array_key_exists — Checks if the given key or index exists in the array
  12. array_keys — Return all the keys of an array
  13. array_map — Applies the callback to the elements of the given arrays
  14. array_merge_recursive — Merge two or more arrays recursively
  15. array_merge — Merge two or more arrays
  16. array_multisort — Sort multiple or multi-dimensional arrays
  17. array_pad — Pad array to the specified length with a value
  18. array_pop — Pop the element off the end of array
  19. array_push — Push one or more elements onto the end of array
  20. array_rand — Pick one or more random entries out of an array
  21. array_reduce — Iteratively reduce the array to a single value using a callback function
  22. array_reverse — Return an array with elements in reverse order
  23. array_search — Searches the array for a given value and returns the corresponding key if successful
  24. array_shift — Shift an element off the beginning of array
  25. array_slice — Extract a slice of the array
  26. array_splice — Remove a portion of the array and replace it with something else
  27. array_sum — Calculate the sum of values in an array.
  28. array_unique — Removes duplicate values from an array
  29. array_unshift — Prepend one or more elements to the beginning of array
  30. array_values — Return all the values of an array
  31. array_walk — Apply a user function to every member of an array
  32. array — Create an array
  33. arsort — Sort an array in reverse order and maintain index association
  34. asort — Sort an array and maintain index association
  35. compact — Create array containing variables and their values
  36. count — Count elements in a variable
  37. current — Return the current element in an array
  38. each — Return the current key and value pair from an array and advance the array cursor
  39. end — Set the internal pointer of an array to its last element
  40. extract — Import variables into the current symbol table from an array
  41. in_array — Return TRUE if a value exists in an array
  42. key — Fetch a key from an associative array
  43. krsort — Sort an array by key in reverse order
  44. ksort — Sort an array by key
  45. list — Assign variables as if they were an array
  46. natcasesort — Sort an array using a case insensitive “natural order” algorithm
  47. natsort — Sort an array using a “natural order” algorithm
  48. next — Advance the internal array pointer of an array
  49. pos — Get the current element from an array
  50. prev — Rewind the internal array pointer
  51. range — Create an array containing a range of elements
  52. reset — Set the internal pointer of an array to its first element
  53. rsort — Sort an array in reverse order
  54. shuffle — Shuffle an array
  55. sizeof — Get the number of elements in variable
  56. sort — Sort an array
  57. uasort — Sort an array with a user-defined comparison function and maintain index association
  58. uksort — Sort an array by keys using a user-defined comparison function
  59. usort — Sort an array by values using a user-defined comparison function

If you like the post & want to get more then Subscribe our blog posts. Subscribe SunwareTech.net RSS Feed Facebook Twitter Email

Both comments and pings are currently closed.

Comments are closed.

Copyright © Sunware Technologies - Your web partner