Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to get previous month in php

echo date('M Y', strtotime("-1 month"));
//to get date with time of previous month
echo date("Y-m-d H:i:s",strtotime("-1 month"));
 
PREVIOUS NEXT
Tagged: #previous #month #php
ADD COMMENT
Topic
Name
3+6 =