Is there a better way of going about this . . .
If (strlen($day) < 2) { $twodigitday = "0" & $day; } else { $twodigitday = $day; }
I found the number_format function but that seems to deal only with decimal points and commas . . .
[man]str_pad[/man]
Beautiful, thanks!
If you're getting $day from the date() function, using "d" in the format produces the day of the month with a leading zero.
Good tip. I'm actually getting the values from customers clicking on numerical dates on a calendar, and reassembling it into a full YYYY-MM-DD, so (I think) str_pad is the route I had to go.