Array : SR - No Function & Description PHP

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 6

Sr.

No Function & Description PHP


array()
1 3
Create an array
array_change_key_case()
2 4
Returns an array with all keys in lowercase or uppercase
array_chunk()
3 4
Splits an array into chunks of arrays
array_combine()
4 5
Creates an array by using one array for keys and another for its values
array_count_values()
5 4
Returns an array with the number of occurrences for each value
array_diff()
6 4
Compares array values, and returns the differences
array_diff_assoc()
7 4
Compares array keys and values, and returns the differences
array_diff_key()
8 5
Compares array keys, and returns the differences
array_diff_uassoc()
9 5
Compares array keys and values, with an additional user-made function
check, and returns the differences
array_diff_ukey()
10 5
Compares array keys, with an additional user-made function check, and
returns the differences
array_fill()
11 4
Fills an array with values
array_fill_keys()
12 5
Fill an array with values, specifying keys
array_filter()
13 4
Filters elements of an array using a user-made function
array_flip()
14 4
Exchanges all keys with their associated values in an array
array_intersect()
15 4
Compares array values, and returns the matches
array_intersect_assoc()
16 4
Compares array keys and values, and returns the matches
array_intersect_key()
17 5
Compares array keys, and returns the matches
array_intersect_uassoc()
18 5
Compares array keys and values, with an additional user-made function
check, and returns the matches
array_intersect_ukey()
19 5
Compares array keys, with an additional user-made function check, and
returns the matches
array_key_exists()
20 4
Checks if the specified key exists in the array
array_keys()
21 4
Returns all the keys of an array
array_map()
22 4
Sends each value of an array to a user-made function, which returns new
values
array_merge()
23 4
Merges one or more arrays into one array
array_merge_recursive()
24 4
Merges one or more arrays into one array
array_multisort()
25 4
Sorts multiple or multi-dimensional arrays
array_pad()
26 4
Inserts a specified number of items, with a specified value, to an array
array_pop()
27 4
Deletes the last element of an array
array_product()
28 5
Calculates the product of the values in an array
array_push()
29 4
Inserts one or more elements to the end of an array
array_rand()
30 4
Returns one or more random keys from an array
array_reduce()
31 4
Returns an array as a string, using a user-defined function
array_reverse()
32 4
Returns an array in the reverse order
array_search()
33 4
Searches an array for a given value and returns the key
array_shift()
34 4
Removes the first element from an array, and returns the value of the
removed element
array_slice()
35 4
Returns selected parts of an array
array_splice()
36 4
Removes and replaces specified elements of an array
array_sum()
37 4
Returns the sum of the values in an array
array_udiff()
38 5
Compares array values in a user-made function and returns an array
array_udiff_assoc()
39 5
Compares array keys, and compares array values in a user-made function,
and returns an array
array_udiff_uassoc()
40 5
Compares array keys and array values in user-made functions, and returns an
array
array_uintersect()
41 5
Compares array values in a user-made function and returns an array
array_uintersect_assoc()
42 5
Compares array keys, and compares array values in a user-made function,
and returns an array
array_uintersect_uassoc()
43 5
Compares array keys and array values in user-made functions, and returns an
array
array_unique()
44 4
Removes duplicate values from an array
array_unshift()
45 4
Adds one or more elements to the beginning of an array
array_values()
46 4
Returns all the values of an array
array_walk()
47 3
Applies a user function to every member of an array
array_walk_recursive()
48 5
Applies a user function recursively to every member of an array
arsort()
49 3
Sorts an array in reverse order and maintain index association
asort()
50 3
Sorts an array and maintain index association
compact()
51 4
Create array containing variables and their values
count()
52 3
Counts elements in an array, or properties in an object
current()
53 3
Returns the current element in an array
each()
54 3
Returns the current key and value pair from an array
end()
55 3
Sets the internal pointer of an array to its last element
extract()
56 3
Imports variables into the current symbol table from an array
57 in_array() 4
Checks if a specified value exists in an array
key()
58 3
Fetches a key from an array
krsort()
59 3
Sorts an array by key in reverse order
ksort()
60 3
Sorts an array by key
list()
61 3
Assigns variables as if they were an array
natcasesort()
62 4
Sorts an array using a case insensitive "natural order" algorithm
natsort()
63 4
Sorts an array using a "natural order" algorithm
next()
64 3
Advance the internal array pointer of an array
pos()
65 3
Alias of current()
prev()
66 3
Rewinds the internal array pointer
range()
67 3
Creates an array containing a range of elements
reset()
68 3
Sets the internal pointer of an array to its first element
rsort()
69 3
Sorts an array in reverse order
shuffle()
70 3
Shuffles an array
sizeof()
71 3
Alias of count()
72 sort() 3
Sorts an array
uasort()
73 3
Sorts an array with a user-defined function and maintain index association
uksort()
74 3
Sorts an array by keys using a user-defined function
usort()
75 3
Sorts an array by values using a user-defined function

You might also like