php - date("m"); returns the following result for this month... "02" -
date("m"); returns following result month... "02"
that fine , dandy, problem is, need change 02 february, , not changing date("f");
i need use date function convert supplied number of 02 february, there way of going logically without bunch of if/else statements??
while date('f') preferred:
$monthnames = array( '01'=>'january', '02'=>'february', '03'=>'march' ); // , on... echo $monthnames[date("m")];
edit adjusting hitherto unspecified requirement:
$ts = mktime (0, 0, 0, date("m"), 1, date("y"));
Comments
Post a Comment