Answers for "php previus month number"

PHP
1

+1 month php

$time = strtotime("2010.12.11");
$final = date("Y-m-d", strtotime("+1 month", $time));
Posted by: Guest on August-07-2020
0

php date function get previous month

$tgl = '25 january 2012';

$prevmonth = date("M Y",mktime(0,0,0,date("m", strtotime($tgl))-1,1,date("Y", strtotime($tgl))));
echo $prevmonth;
Posted by: Guest on August-18-2020

Browse Popular Code Answers by Language