Search
 
SCRIPT & CODE EXAMPLE
 

PHP

last day of previous month in php

$lastDay = date('t',strtotime('last month'));

print_r($lastDay);
Comment

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"));
Comment

previous month number in php

<?php
    $date = "2020-01-11";
    $newdate = date("Y-m-d", strtotime ( '-1 month' , strtotime ( $date ) )) ;
    echo $newdate;
?>
Comment

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;
Comment

PREVIOUS NEXT
Code Example
Php :: how to save the variable from query in mysql with php 
Php :: migrate specific file in laravel 
Php :: php email attachment and message 
Php :: get user type wp php 
Php :: Woocommerce - Adding a Custom Endpoint 
Php :: laravel apache public folder 
Php :: laravel assets 
Php :: carbon previous day 
Php :: laravel run specific feature test 
Php :: php ofreach 
Php :: how validate the value of object in arraye in laravel 
Php :: Class "Controller" not found 
Php :: install tymon jwt laravel 
Php :: Merge Two Collection or Array 
Php :: php regex match numbers only 
Php :: laravel route target class not found 
Php :: how convert the date and time to integer in laravel 
Php :: laravel relationship order by 
Php :: PHP is_array() Function 
Php :: php time to date 
Php :: laravel pluck relationship 
Php :: sitemap for php website 
Php :: remove string after comma in php 
Php :: wordpress get user profile picture 
Php :: php encrypt decrypt url parameters 
Php :: php convert 
Php :: static function model laravel 
Php :: laravel eager loading where clause 
Php :: laravel migration remove nullable 
Php :: transient wordpress 
ADD CONTENT
Topic
Content
Source link
Name
3+6 =