PHP date get month

PHP date get month


Posted in : PHP Posted on : January 25, 2011 at 6:32 PM Comments : [ 0 ]

In this tutorial you will learn how to PHP date get month in a PHP web application.

PHP date get month

In this tutorial you will learn how to PHP date get month in a PHP web application. The date("M",strtotime("$date"))  that return month name and if use m, that return month  in number. The code of  "php-date-get-month.php" given below as :

<?php
$date =date('Y-m-d');
echo "Current date :: ".$date."<br>";
$month =date("M",strtotime($date))."(".date("m",strtotime($date)).")";
echo "Month : ".$month;
?>

Output :

 when run  "php-date-get-month.php" display output as :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics