Sunday 4 March 2012

PHP: Array Related Functions

  1. array_change_key_case — Changes all keys in an array
  2. array_chunk — Split an array into chunks
  3. array_combine — Creates an array by using one array for keys and another for its values
  4. array_count_values — Counts all the values of an array
  5. array_diff_assoc — Computes the difference of arrays with additional index check
  6. array_diff_key — Computes the difference of arrays using keys for comparison
  7. array_diff_uassoc — Computes the difference of arrays with additional index check which is performed by a user supplied callback function
  8. array_diff_ukey — Computes the difference of arrays using a callback function on the keys for comparison
  9. array_diff — Computes the difference of arrays
  10. array_fill_keys — Fill an array with values, specifying keys
  11. array_fill — Fill an array with values
  12. array_filter — Filters elements of an array using a callback function
  13. array_flip — Exchanges all keys with their associated values in an array
  14. array_intersect_assoc — Computes the intersection of arrays with additional index check
  15. array_intersect_key — Computes the intersection of arrays using keys for comparison
  16. array_intersect_uassoc — Computes the intersection of arrays with additional index check, compares indexes by a callback function
  17. array_intersect_ukey — Computes the intersection of arrays using a callback function on the keys for comparison
  18. array_intersect — Computes the intersection of arrays
  19. array_key_exists — Checks if the given key or index exists in the array
  20. array_keys — Return all the keys or a subset of the keys of an array
  21. array_map — Applies the callback to the elements of the given arrays
  22. array_merge_recursive — Merge two or more arrays recursively
  23. array_merge — Merge one or more arrays
  24. array_multisort — Sort multiple or multi-dimensional arrays
  25. array_pad — Pad array to the specified length with a value
  26. array_pop — Pop the element off the end of array
  27. array_product — Calculate the product of values in an array
  28. array_push — Push one or more elements onto the end of array
  29. array_rand — Pick one or more random entries out of an array
  30. array_reduce — Iteratively reduce the array to a single value using a callback function
  31. array_replace_recursive — Replaces elements from passed arrays into the first array recursively
  32. array_replace — Replaces elements from passed arrays into the first array
  33. array_reverse — Return an array with elements in reverse order
  34. array_search — Searches the array for a given value and returns the corresponding key if successful
  35. array_shift — Shift an element off the beginning of array
  36. array_slice — Extract a slice of the array
  37. array_splice — Remove a portion of the array and replace it with something else
  38. array_sum — Calculate the sum of values in an array
  39. array_udiff_assoc — Computes the difference of arrays with additional index check, compares data by a callback function
  40. array_udiff_uassoc — Computes the difference of arrays with additional index check, compares data and indexes by a callback function
  41. array_udiff — Computes the difference of arrays by using a callback function for data comparison
  42. array_uintersect_assoc — Computes the intersection of arrays with additional index check, compares data by a callback function
  43. array_uintersect_uassoc — Computes the intersection of arrays with additional index check, compares data and indexes by a callback functions
  44. array_uintersect — Computes the intersection of arrays, compares data by a callback function
  45. array_unique — Removes duplicate values from an array
  46. array_unshift — Prepend one or more elements to the beginning of an array
  47. array_values — Return all the values of an array
  48. array_walk_recursive — Apply a user function recursively to every member of an array
  49. array_walk — Apply a user function to every member of an array
  50. array — Create an array
  51. arsort — Sort an array in reverse order and maintain index association
  52. asort — Sort an array and maintain index association
  53. compact — Create array containing variables and their values
  54. count — Count all elements in an array, or properties in an object
  55. current — Return the current element in an array
  56. each — Return the current key and value pair from an array and advance the array cursor
  57. end — Set the internal pointer of an array to its last element
  58. extract — Import variables into the current symbol table from an array
  59. in_array — Checks if a value exists in an array
  60. key — Fetch a key from an array
  61. krsort — Sort an array by key in reverse order
  62. ksort — Sort an array by key
  63. list — Assign variables as if they were an array
  64. natcasesort — Sort an array using a case insensitive "natural order" algorithm
  65. natsort — Sort an array using a "natural order" algorithm
  66. next — Advance the internal array pointer of an array
  67. pos — Alias of current
  68. prev — Rewind the internal array pointer
  69. range — Create an array containing a range of elements
  70. reset — Set the internal pointer of an array to its first element
  71. rsort — Sort an array in reverse order
  72. shuffle — Shuffle an array
  73. sizeof — Alias of count
  74. sort — Sort an array
  75. uasort — Sort an array with a user-defined comparison function and maintain index association
  76. uksort — Sort an array by keys using a user-defined comparison function
  77. usort — Sort an array by values using a user-defined comparison function

No comments:

Post a Comment

Please feel free to comment. No backlinks will be displayed.