In the date() function, j is day of the month w/o leading zeros, but none of the documentation i read says how to put leading zeros into the day. how can i do this? my database wants them formatted this way
if(date("j") < 10) { $date = "0".date("j"); } else { $date = date("j"); }
Originally posted by garfield213 In the date() function, j is day of the month w/o leading zeros, but none of the documentation i read says how to put leading zeros into the day. how can i do this? my database wants them formatted this way
dont use j use d instead. and dont use the code above, waste of time.
Originally posted by TheIceman5 and dont use the code above, waste of time.
Awwwwww, cmon. If ya can't look at the manual, the code above is just fine :p
yeah it will work but its a waste of space when u only need change one letter. i only remembered that letter as i was only formatting dates a couple hours ago.
thanks i read the manual twice and looked in my php book, but i couldnt find that maybe im just illeterate