In this tutorial you will learn how to find PHP date one month ago in a PHP web application .
PHP date one month ago
In this tutorial you will learn how to find PHP date one month ago in a PHP web application . The code of "php-date-one-month-ago.php" given below :
<?php $date='2011-01-28'; echo "Date :: ".$date."<br>"; $date_arr=explode('-',$date); echo "Date one month ago =>"; echo Date("Y-m-d",mktime(0,0,0,$date_arr[1]+1,$date_arr[2],$date_arr[0]))."<br>"; ?>
Output :
When run "php-date-one-month-ago.php" display output as :
[ 0 ] Comments