PHP list() Function

The list() function is used to assign values to a list of variables. Like array(), this is not really a function, but a language construct. list() is used to assign a list of variables in one operation. Note: This function…

Read MorePHP list() Function

PHP ksort() Function

The ksort() function sorts an array by key, maintaining key to data correlations. This is useful mainly for associative arrays. Tip: Use the krsort() function to sort an associative array in descending order, according to the key. Tip: Use the…

Read MorePHP ksort() Function

PHP krsort() Function

The krsort() function sorts an associative array in descending order, according to the key. Tip: Use the ksort() function to sort an associative array in ascending order, according to the key. Tip: Use the arsort() function to sort an associative…

Read MorePHP krsort() Function

PHP key() Function

The key() function is used to get the index element of the current array position. This function returns FALSE on error. Returns the key of the array element that is currently being pointed to by the internal pointer Parameter Description…

Read MorePHP key() Function

PHP extract() Function

This function is used to import variables from an array into the current symbol table. It takes an associative array array and treats keys as variable names and values as variable values. For each key/value pair it will create a…

Read MorePHP extract() Function

PHP end() Function

The end() function is used to move the internal pointer of an array to its last element. The value of the last element of array1. Value Type : Mixed*. *Mixed : Mixed indicates multiple (but not necessarily all) types. Parameter…

Read MorePHP end() Function

PHP each() Function

The each() function returns the current element key and value, and moves the internal pointer forward. Note: After each() has executed, the array cursor will be left on the next element of the array, or past the last element if…

Read MorePHP each() Function

PHP current() Function

The current() function is used to fetch the value of the current element in an array. Every array has an internal pointer to its “current” element, which is initialized to the first element inserted into the array. Tip: This function…

Read MorePHP current() Function

PHP count() Function

You can use the PHP count() or sizeof() function to get the number of elements or values in an array. The count() and sizeof() function returns 0 for a variable that has been initialized with an empty array, but it…

Read MorePHP count() Function