Get Month Name From Number With PHP

Free Scripts :: PHP :: Date and Time :: Get Month Name From Number With PHP

Author: Salman Javaid

Website: http://www.salman.be

  • Get month name from integer with php.
  • How to get month name from number with php.

This function accepts a number value and returns month name against it.

Function

public static function getMonth($month){
        return date('F', mktime(0,0,0,$month,1));
    }

Calling The Function

echo getMonth(5);

Output

May

Comments

No comments. Be the first one.

Leave a comment

Full Name*
Comments*
Security Code*

Our Partners

Getty Icons  Salman Creations
Free High Quality Images  Learn Free Languages 
Opal Hosting  R-Tech Solutions
  • Submit a Script

    Click here to submit your script.