PHP array

अब Quizwiz के साथ अपने होमवर्क और परीक्षाओं को एस करें!

Compare arrays and returns the matches (compare keys and values)

array_intersect_assoc()

Compare arrays, and returns the matches (compare keys only)

array_intersect_key()

Compare arrays, and returns the matches (compare keys and values, using a user-defined key comparison function)

array_intersect_uassoc()

Compare arrays, and returns the matches (compare keys only, using a user-defined key comparison function)

array_intersect_ukey()

Checks if the specified key exists in the array

array_key_exists()

Returns all the keys of an array

array_keys()

Sends each value of an array to a user-made function, which returns new values

array_map()

Merges one or more arrays into one array

array_merge()

Merges one or more arrays into one array recursively

array_merge_recursive()

Sorts multiple or multi-dimensional arrays

array_multisort()

Inserts a specified number of items, with a specified value, to an array

array_pad()

Deletes the last element of an array

array_pop()

Calculates the product of the values in an array

array_product()

Inserts one or more elements to the end of an array

array_push()

Returns one or more random keys from an array

array_rand()

Returns an array as a string, using a user-defined function

array_reduce()

Replaces the values of the first array with the values from following arrays

array_replace()

Replaces the values of the first array with the values from following arrays recursively

array_replace_recursive()

Returns an array in the reverse order

array_reverse()

Searches an array for a given value and returns the key

array_search()

Removes the first element from an array, and returns the value of the removed element

array_shift()

Returns selected parts of an array

array_slice()

Removes and replaces specified elements of an array

array_splice()

Returns the sum of the values in an array

array_sum()

Compare arrays, and returns the differences (compare values only, using a user-defined key comparison function)

array_udiff()

Compare arrays, and returns the differences (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)

array_udiff_assoc()

Compare arrays, and returns the differences (compare keys and values, using two user-defined key comparison functions)

array_udiff_uassoc()

Compare arrays, and returns the matches (compare values only, using a user-defined key comparison function)

array_uintersect()

Compare arrays, and returns the matches (compare keys and values, using a built-in function to compare the keys and a user-defined function to compare the values)

array_uintersect_assoc()

Compare arrays, and returns the matches (compare keys and values, using two user-defined key comparison functions)

array_uintersect_uassoc()

Removes duplicate values from an array

array_unique()

Adds one or more elements to the beginning of an array

array_unshift()

Returns all the values of an array

array_values()

Applies a user function to every member of an array

array_walk()

Applies a user function recursively to every member of an array

array_walk_recursive()

What is multidimensional array?

arrays containing one or more arrays.

what is associative array?

arrays with named keys.

What is indexed array?

arrays with numeric index.

Sorts an associative array in descending order, according to the value

arsort()

Sorts an associative array in ascending order, according to the value

asort()

Sorts an associative array in ascending order, according to the key

ksort()

Assigns variables as if they were an array

list()

Sorts an array using a case insensitive "natural order" algorithm

natcasesort()

Sorts an array using a "natural order" algorithm

natsort()

Advance the internal array pointer of an array

next()

Alias of current()

pos()

Rewinds the internal array pointer

prev()

Creates an array containing a range of elements

range()

Sets the internal pointer of an array to its first element

reset()

Sorts an indexed array in descending order

rsort()

Shuffles an array

shuffle()

Alias of count()

sizeof()

Sorts an indexed array in ascending order

sort()

Sorts an array by values using a user-defined comparison function

uasort()

Sorts an array by keys using a user-defined comparison function

uksort()

Sorts an array using a user-defined comparison function

usort()

Flips/Exchanges all keys with their associated values in an array

array_flip()

changes all keys in an array to lowercase or uppercase

array_change_key_case()

splits an array into chunk of arrays.

array_chunk()

Returns the values from a single column in the input array.

array_column()

creates an array by using the elements from one "keys" array and one "values" array

array_combien()

counts all the values of an array.

array_count_values()

compare arrays, and returns the difference (compare values only)

array_diff()

Compare arrays, and returns the matches (compare values only)

array_intersect()

What are the three types of arrays?

Indexed arrays, Associative arrays, Multidimensional arrays.

Fetches a key from an array

key()

Sorts an associative array in descending order, according to the key

krsort()

compare arrays, and returns the differences (compare keys and values)

array_diff_assoc()

compare arrays, and returns the differences (compare keys only)

array_diff_key()

compare arrays, and returns the differences(compare keys and values, using a user defined key comparison function)

array_diff_uassoc()

compare arrays, and returns the differences (compare keys only, using a user-defined key comparison function)

array_diff_ukey()

Fills an array with values.

array_fill()

Fills an array with values, specifying keys

array_fill_keys()

Filters the values of an array using a callback function

array_filter()

function to create an array

array()

Syntax for associative arrays.

array(key1=>value,key2=>value,key3=>value)

Syntax for indexed arrays().

array(value1, value2, value3)

Create array containing variables and their values

compact()

Returns the number of elements in an array

count()

Returns the current element in an array

current()

Deprecated from PHP 7.2.- Returns the current key and value pair from an array

each()

Sets the internal pointer of an array to its last element

end()

Imports variables into the current symbol table from an array

extract()

Checks if a specified value exists in an array

in_array()


संबंधित स्टडी सेट्स

Pscyh-Ch. 13: Industrial-Organizational Psychology

View Set

RBI's Function, Monetary Policy & Fiscal Policy

View Set

Chapter 18, 19, 20 -Test Questions

View Set

Chapter 16: Outcome Identification and Planning

View Set