PHP array_uintersect() Function6 Jan 2025 | 2 min read The array_uintersect() is an inbuilt function in PHP. It is used to compute the intersection of two or more arrays depending on the values. The first array values are compared with all the other arrays with the help of an user-defined function, and the matches are returned. This function was introduced in PHP 5.0. SyntaxParameters
ReturnThe array_uintersect( ) function returns an array containing the entries from array1 that are present in all of the other arrays. Example 1Output: Array ( [d] =>jmeter ) Example 2Output: Array ( [a] => java [b] => c ) Example 3Output: Array ( [a] => java [b] =>php [0] => python ) Example 4Output: Array ( [1] => 53 [2] => 43 ) Next TopicPhp-array-uintersect-uassoc-function |
The array_intersect_uassoc( ) function is an inbuilt function in PHP. The array_intersect_uassoc( ) function is used to compare key and values of two or more arrays by using a user-defined comparison function and return the matches. It returns an array containing all the values of...
2 min read
PHP asort() Function The asort( ) function is an inbuilt function of PHP. The asort( ) function is used to sort an associative array in ascending order, according to the value. This function was introduced in PHP 4.0. Syntax bool asort ( array &$array [, int $sort_flags =...
1 min read
PHP list() Function The PHP list( ) function is used to assign values to a list of variables in one operation. This function was introduced in PHP 4.0. Syntax array list ( mixed $var1 [, mixed $... ] ); Parameter Parameter Description Is compulsory Variable1 The first variable to assign a value to. compulsory Variable2... More variables...
1 min read
The array_diff() function compares two or more arrays and returns an array with the keys and values from the first array, only if the value is not present in any of the other arrays. This function was introduced in PHP 4.0. Syntax array_diff(array1,array2,array3...); Parameter Description Is compulsory array1 The array to compare...
2 min read
The array_map( ) is an built-in function in PHP. The array_map( ) function sends each value of an array to a user-defined function, and returns an array with new values given by the user-defined function. This function was introduced in 4.0.6. Syntax array array_map ( callable $callback...
1 min read
PHP shuffle() Function The PHP shuffle( ) function is used to randomize the order of the elements in the array. The function assigns new keys to the elements in an array. This function introduced in PHP 4.0. Syntax bool shuffle ( array &$array ); Parameter Parameter Description Is compulsory array Specifies the array to...
1 min read
The array_merge_recursive( ) function is a built-in function in PHP. This function is used to merge the elements or values of two or more arrays together into a single array, the values of one are appended to the end of the ious one. This function...
1 min read
PHP array_unique( ) Function The array_unique( ) function is an inbuilt function of PHP and it is used to remove duplicate values from an array. This function was introduced in 4.0.1 Syntax array array_unique ( array $array [, int $sort_flags = SORT_STRING ] ); Parameters Parameter Description Is compulsory array1 The input array. compulsory sort_flags The optional...
1 min read
PHP uasort() Function The PHP uasort( ) function is used to sort an array by its values using a user-defined comparison function. This function was introduced in PHP 4.0. Syntax bool uasort ( array &$array , callable $value_compare_func ); Parameter Parameter Description Is compulsory array Specifies the array to be sorted. compulsory user_defined_function This function is a...
2 min read
PHP uksort() Function The PHP uksort( ) function is used to sort an array by the elements keys using a user-defined comparison function. This function was introduced in PHP 4.0. Syntax bool uksort ( array &$array , callable $key_compare_func ); Parameter Parameter Description Is compulsory array Specifies the array to be sorted. compulsory user_defined_function This function is...
2 min read
We request you to subscribe our newsletter for upcoming updates.
We provides tutorials and interview questions of all technology like java tutorial, android, java frameworks
G-13, 2nd Floor, Sec-3, Noida, UP, 201301, India