In my previous post we just discussed about the PHP Array Introduction and described types of the Array, short code for array etc. In this post I am just moving forward and describing array functions provides by the PHP.
1. PHP array() function
PHP array() function allows you to create indexed, associative and multidimensional arrays. PHP array() function is used to create an array and it returns an array.
array ([ mixed $... ] )
<?php $direction = array("east","west","north","south"); echo "Directions are :- $direction[0], $direction[1], $direction[2], $direction[3]"; ?>
Output:
Directions are :- east, west, north, south
Below is the list of other prebuilt Array functions of PHP:
1. array_push
2. array_pop
3. array_change_key_case
4. array_chunk
5. array_column
6. array_merge
7. array_combine
8. array_count_values
9. array_diff_assoc
10. array_diff_key
11. array_diff_uassoc
12. array_diff_ukey
13. array_diff
14. array_fill_keys
15. array_fill
16. array_filter
17. array_flip
18. array_intersect_assoc
19. array_intersect_key
20. array_intersect_uassoc
21. array_intersect_ukey
22. array_intersect
23. array_key_exists
24. array_key_first
25. array_key_last
26. array_keys
27. array_map
28. array_merge_recursive
29. array_multisort
30. array_pad
31. array_product
32. array_rand
33. array_reduce
34. array_replace_recursive
35. array_replace
36. array_reverse
37. in_array
38. array_search
39. array_shift
40. array_slice
41. array_splice
42. array_sum
43. array_udiff_assoc
44. array_udiff_uassoc
45. array_udiff
46. array_uintersect_assoc
47. array_uintersect_uassoc
48. array_uintersect
49. array_unique
50. array_unshift
51. array_values
52. array_walk_recursive
53. array_walk
54. arsort
55. asort
56. compact
57. count
58. current
59. end
60. extract
61. key_exists
62. key
63. krsort
64. ksort
65. list
66. natcasesort
67. natsort
68. next
69. pos
70. prev
71. range
72. reset
73. rsort
74. shuffle
75. sizeof
76. sort
77. uasort
78. uksort
79. usort
Deprecated in latest PHP :
80. each
In the previous post I describe regarding the Introduction of PHP Array.
Hope this article helps you in PHP development and understandings of Array. Stay tuned for more PHP Tutorials, Hope you enjoyed reading, if you need the professional PHP, PHP Framework and Magento 2 Development we can help you, just Click on the Link and send me your requirements.