Code: Select all
die(date('m-d-Y', mktime(1, 1, 1, 07, 09, 2007)));
//output: 06-30-2007I have been trying to come up with a way to remove the leading 0 from an int but without avail. The only thing I came up with was turning it into a string then getting the intval() from that but thats so silly. I have tried multiplying it by 1, casting it as an int, getting the intval, but nothing. And why does this leading 0 screw things up so badly in the first place?