Answers for "php echo last month"

PHP
10

get last character of string php

substr("testers", -1); // returns "s"
Posted by: Guest on March-05-2020
0

+1 month php

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

get last month php

$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");
Posted by: Guest on July-30-2020
1

get last month using php

//Last month
$lastMonth = Date("F", strtotime("first day of previous month");
$nextMonth = Date("F", strtotime("first day of next month");
Posted by: Guest on November-28-2020

Browse Popular Code Answers by Language