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")); 

doc: http://us2.php.net/manual/en/function.mktime.php


Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -