Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php get first and last day of previous month

date('Y-m-01', strtotime('last month'));
date('Y-m-t', strtotime('last month'));
Comment

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

getting last day of next month in php

$lastDateOfNextMonth =strtotime('last day of next month') ;

$lastDay = date('d/m/Y', $lastDateOfNextMonth);

 

print_r($lastDay);
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 last day of month

$a_date = "2009-11-23";
echo date("Y-m-t", strtotime($a_date));
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

php get last day of month

$lastOfMonth = date('Y-m-t');
Comment

check if is the last day of the month php

if(gmdate('t') == gmdate('d')){
    echo 'Last day of the month.';
}
Comment

PREVIOUS NEXT
Code Example
Php :: how change the languge of fie manager in laravel 
Php :: teruglopende for loop php 
Php :: cart icon in woocommerce 
Php :: webuzo set upload limit 
Php :: delete uploaded media file wp using code 
Php :: blade capitalize first letter 
Php :: php remove class attribute 
Php :: use if in laravel blade 
Php :: php replace 
Php :: php get random element from array 
Php :: websocket 2006 MySQL server has gone away 
Php :: php close session 
Php :: php Error!: could not find driver 
Php :: laravel 5.4 forelse 
Php :: php return loading message 
Php :: php mysql error 
Php :: how to set session in laravel 
Php :: laravel run local to all land networks 
Php :: php unique string 
Php :: date 3 months ago for a particular date php 
Php :: open php ini from terminal 
Php :: php replace multiple spaces end chrters to one 
Php :: concat in laravel 8 
Php :: request old laravel form select 
Php :: php string to char array 
Php :: wordpress get text of wordpress post 
Php :: php find key in array 
Php :: WP Uploads Media Path 
Php :: PHP | get client ip 
Php :: wordpress get link to post by id 
ADD CONTENT
Topic
Content
Source link
Name
6+9 =