Q:

Write a PHP script to convert the number to month name

0

Write a PHP script to convert the number to month name

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

<?php
$month_num  = 9;
$dateObj   = DateTime::createFromFormat('!m', $month_num);
$month_name = $dateObj->format('F');
echo $month_name."\n";
?>

Sample Output:

September

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

Similar questions


need a help?


find thousands of online teachers now