PHP current() Function6 Jan 2025 | 1 min read The current( ) function is an inbuilt function of PHP, and it is used to return the value of the current element in an array. This function was introduced in PHP 4.0. SyntaxParameters
Return ValuesThe current( ) function returns the value of the current element in an array or false on empty elements. Example 1Output: javatpoint Example 2Output: udemy Example 3Output: udacity Example 4Output: edureka Next TopicPhp-array-diff-assoc-function |
The array_combine() function is an inbuilt function in PHP. This function is introduced in PHP 5. It is used to create an array by using one array for keys and another for its values. Syntax array_combine(array_keys,array_values); Parameter Description Is compulsory array_keys The keys of the array to be used compulsory array_values The values of the...
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
The array_sum( ) function is an inbuilt function of PHP. The array_sum( ) function calculates the sum of values in an array and returns the sum of values in an array as an integer or float. This function was introduced in PHP 4.0.4. Syntax number array_sum (...
1 min read
It is an inbuilt function in PHP. The array_column() function is used to return the values from a single column in the input array. This function is introduced in PHP 5.5. Syntax array_column(array,column_key,index_key); Parameter Description Is compulsory array Specifies the multi-dimensional array to use compulsory Column_key This parameter may be an integer or a string...
2 min read
PHP array diff_ukey() Function 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...
2 min read
The each( ) function is an inbuilt function of PHP. It is used to fetch the key and value of the current element and moves the internal pointer forward. This function was introduced in PHP 4.0. Syntax array each ( array &$array ); Parameter Parameter Description Is compulsory array Specifies the array to...
1 min read
The array_filter( ) function filters the values of an array using a callback function. This function passes each value of the input array to the callback function. If the callback function returns true, the current value from the input is returned into the result array....
2 min read
This function is used to flip the array with the keys and values. It takes one parameter that is an array. The returned array will contain the flipped elements. The values will be the keys, and the keys will be the values. This function was...
1 min read
The array_splice() function is an extended version of array_slice() function. The array_splice() function removes selected elements from an array and replaces it with new elements. This function was introduced in PHP 4. Syntax arrayarray_splice ( array &$input , int $offset [, int $length = count($input) [, mixed...
1 min read
The array_uintersect_assoc( ) function is an inbuilt function of PHP. The array_uintesect_assoc() function compares two or more arrays, and then returns an array containing the elements from the first array. This function was introduced in PHP 5.0. Syntax array array_uintersect_assoc ( array $array1 , array $array2 [,...
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