PHP array diff_ukey() Function6 Jan 2025 | 2 min read The array_diff_ukey() is an inbuilt function in PHP. The array_diff_ukey() function compares the keys of two or more arrays with a user-defined function, and returns an array that contains the entries from array1 that are not present in array2 or array3, etc. This function was introduced in PHP 5.1. Syntax
Return TypeIt returns an array containing all the entries from array1 that are not present in any of the other arrays. Example 1Output: Array( [c] => 3 [j] => phptpoint.com ) Example 2Output: Array ( [c] => cat ) Example 3Output: Array( [c] => php ) Example 4Output: Array( [z] => football ) Next TopicPhp-array-each-function |
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 pos() Function The PHP pos( ) function is used to fetch the value of the current element in an array. The PHP pos( ) function is an alias of current( ) function. This function was introduced in PHP 4.0. Syntax pos($array); Parameter Parameter Description Is compulsory array Specifies the array to use. compulsory Returns The pos(...
1 min read
PHP natsort() Function The PHP natsort( ) function is used to sort an array using a "natural order" algorithm. The natsort( ) function implements a sort algorithm but maintains original keys and values. This function was introduced in PHP 4.0. Syntax bool natsort ( array &$array ); Parameter Parameter Description Is compulsory array Specifies...
2 min read
PHP rsort() Function The PHP rsort( ) function is used to sort an array in reverse order. This function introduced in PHP 4.0. Syntax bool rsort ( array &$array [, int $sort_flags = SORT_REGULAR ] ); Parameter Parameter Description Is compulsory array Specifies the array to use. compulsory Sort flags It specifies how to sort the array...
1 min read
The array_arsort( ) function is an inbuilt function of PHP. The array_arsort( ) function is used to sort an array in reverse order and the function maintains index association. This function was introduced in 4.0. Syntax bool arsort ( array &$array [, int $sort_flags = SORT_REGULAR ]...
1 min read
PHP () Function The PHP ( ) function is used to fetch the array value in the ious place, pointed by the internal array pointer. This function was introduced in PHP 4.0. Syntax mixed ( array &$array ); Parameter Parameter Description Is compulsory array Specifies the array to use. compulsory Returns The ( ) function returns...
1 min read
PHP end() Function The end( ) function is an inbuilt function of PHP. The end() function Set the internal pointer of an array to its last element. This function was introduced in 4.0. Syntax mixed end ( array &$array ); Parameter Parameter Description Is compulsory array Specifies the array to use. compulsory Returns The end( ) function...
1 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
The array_shift() function is an inbuilt function of PHP. The array_shift( ) function is used to remove the first element from an array, and returns the value of the removed element. This function was introduced in PHP 4.0. Syntax mixed array_shift ( array &$array ); Parameter Parameter Description Is compulsory array name The...
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
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