PHP Date to strtotime not working -
hello i'm new here.
this working good.
$date = "05/15/2015"; $strtotime = date(strtotime("$date")); echo $strtotime;
but not working.
$date = "15/may/2015"; $strtotime = date(strtotime("$date")); echo $strtotime;
please solve problem. thanks
the valid date formats listed here.
some examples be:
15-may 2015 may 15, 2015 05/15/2015 15-05-2015 2015-05-15
if want use non-standard format. happen work hyphens instead of slashes can fix str_replace.
the date() call unnecessary , used incorrectly.
$date = "15/may/2015"; $strtotime = strtotime( str_replace("/", "-", "$date") ); echo $strtotime;
Comments
Post a Comment