Technology : General Technology Notes: Diary of a late,late adopter.
Updated: 8/14/2003; 1:41:09 AM.

 

Frequent Visits
Categories

Subscribe to "Technology" in Radio UserLand.

Click to see the XML version of this web page.

Click here to send an email to the editor of this weblog.

 
 

Thursday, March 27, 2003

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    comment []

© Copyright 2003 mcgyver5.



Click here to visit the Radio UserLand website.

 


March 2003
Sun Mon Tue Wed Thu Fri Sat
            1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31          
Feb   Apr