Updated: 8/14/2003; 1:26:54 AM.
Distressed Fabric
Mcgyver5's Radio 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 []


I want to try this helmet. It tickles your frontal lobe with magnetism and induces mystical experiences.
8:14:48 PM    comment []


Customer Feedback on Fish license data:

"I was looking at the data you had given me from the ELS today and noticed something peculiar. Of the 326,000 records that are in the file there are only 45 that belong to 16 year old anglers. The number jumps to almost 3,000 for 17 yr olds and then up around 6,000 for ages 18-22. I thought that it was strange that only 45 kids bought a license when they turned 16 (the age they are required to have one). Any thoughts on why this number might be so low? I'm curious to see what the statewide license sales to 16 year olds is. If you get a chance could you run a query for fishing license sales to 16 year olds. You can make this a very low priority though, since it is more to satisfy my curiosity than to meet a need for the data."

--I mistakenly calculated the ages based on how old the license holders would be in 2003, when the data he requested was for 2002 licenses.  I am glad he caught it and I can avoid that pitfall going forward.  I could also just include birth year by default and let the users calculate the age confidently.


1:17:34 PM    comment []


© Copyright 2003 mcgyver5.
 
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

Frequent Visits
Categories

Click here to visit the Radio UserLand website.

Subscribe to "Distressed Fabric" 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.