SkyRanger Posted February 10, 2012 Share Posted February 10, 2012 I am trying to convert Numbers to months from mySQL. What I current have in my db is smonth = # What I am trying to figure out is if there is a way to do an array that will convert the # to a month instead of use if $smonth = 1 echo January. Any help is greatly appreciated and thank you in advance. Quote Link to comment Share on other sites More sharing options...
SkyRanger Posted February 10, 2012 Author Share Posted February 10, 2012 Nevermind. Figured it out. Had to use mktime to get it to work. $month_number = $rows['smonth']; $month_name = date( 'F', mktime(0, 0, 0, $month_number) ); echo $month_name; Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.