get last month php
snippet in php

get last month php

user3538

$currentMonth = date('M');// if number, then date('m');
//Last month
$lastMonth = Date("F", strtotime("first day of previous month");
$nextMonth = Date("F", strtotime("first day of next month");

get last month using php

user2262

//Last month
$lastMonth = Date("F", strtotime("first day of previous month");
$nextMonth = Date("F", strtotime("first day of next month");