I wrote this function and I want it to display like this 2003-11-30 but right now it is displaying like this 1072760400 how do I format this? This is my function:
function expire_date($months)
{
$date = mktime (0,0,0,date("m")+$months,date("d"), date("Y"));
return $date;
}
Thanks
using date
Moderator: General Moderators
Code: Select all
<?php
function expire_date($months)
{
$date = mktime (0,0,0,date("m")+$months,date("d"), date("Y"));
return date("Y-m-d", $date);
}
?>