Stupid PHP function of the day: current(); returns the value of the current element of an array. Except if the element is empty or null or zero then it returns false.?$%&$ Also, if you add an element to an array, current() will never get the last element added. It will return the second to last value unless you issue the end() command on the array.
current() has a sister function called key() which returns the key instead of the value and has the same issues with adding an extra element.
Hmmm.
9:39:56 PM
|