Connect with us

Convert number to month name in PHP

If you want to convert number to month name than use below code:

$dateObj   = DateTime::createFromFormat('!m', $post_row['month']);
echo $monthName = $dateObj->format('F'); // March

Your Answer

Please login or Register to submit your answer
Not the answer you are looking for? Browse other questions tagged or ask your own question.

Log In

Subscribe to our newsletter

Enter your email address to subscribe to blog and receive notifications of new articles by email.
100% Privacy. No spam guaranteed