PHP range() Function
This function returns an array of elements from low to high, inclusive. If low > high, the sequence will be from high to low. Note: If the low parameter is higher than the high parameter, the range array will be…
This function returns an array of elements from low to high, inclusive. If low > high, the sequence will be from high to low. Note: If the low parameter is higher than the high parameter, the range array will be…
The prev() function moves the internal pointer to, and outputs, the previous element in the array. Returns the value of the previous element in the array on success, or FALSE if there are no more elements The previous element of…
The pos() function returns 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 does not move…
The next() function is used to advance the internal array pointer. next() behaves like current(), with one difference. It advances the internal array pointer one place forward before returning the element value. Returns the value of the next element in…
The natsort() function sorts an array by using a “natural order” algorithm. The values keep their original keys. This function implements a sort algorithm that orders alphanumeric strings in the way a human being would while maintaining key/value associations. Parameter…
The natcasesort() function sorts an array by using a “natural order” algorithm. The values keep their original keys. This function is case-insensitive. This function returns TRUE on success, or FALSE on failure. Parameter Description array Required. Specifies the array to…
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…
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…
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…
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…