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

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

php last day of month

$a_date = "2009-11-23";
echo date("Y-m-t", strtotime($a_date));
Comment

php date first day of month and last month

$first = date('Y-m-01', strtotime('last month'));
$last = date('Y-m-t', strtotime('last month'));
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 :: test if php is installed 
Php :: google translate api php 
Php :: set default value for column in laravel model 
Php :: best pagination in laravel api with eloquent 
Php :: how to check laravel version in cmd 
Php :: convert date php 
Php :: add to collection laravel 
Php :: laravel model particular column 
Php :: cookie are not set in php 
Php :: publish Laravel mail pages to customize 
Php :: laravel 8 created at format 
Php :: laravel migration two primary key 
Php :: format money with commas in php 
Php :: laravel assign class dynamically if condition true 
Php :: php remove last 3 letters from string 
Php :: e_notice in php 
Php :: how to replace multiple characters in a string in php 
Php :: laravel object to array 
Php :: phpoffice create excel and download 
Php :: insall laravel 
Php :: laravel timestamp 
Php :: laravel rule unique ignore 
Php :: error in laravel 
Php :: tl to usd 
Php :: get last letter in php 
Php :: password_hash 
Php :: require in php 
Php :: laravel menu active class 
Php :: Check if a String Starts With a Specified String in PHP 
Php :: database collection to array 
ADD CONTENT
Topic
Content
Source link
Name
8+1 =