Re: adding leading zeros to a date



Alternatively:

$InDate = date('Y-m-d', mktime(0, 0, 0, $inmonth, $inday, $inyear));

.