Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php subtract date from today

<?php
$date_raw = 2022-02-17;
$first_date = strtotime($date_raw);
$second_date = strtotime('-1 day', $first_date);

print 'First Date ' . date('Y-m-d', $first_date);
print 'Next Date ' . date('Y-m-d', $second_date);
?>
Comment

PREVIOUS NEXT
Code Example
Php :: Call to undefined method IlluminateSessionStore::set() 
Php :: laravel orderby with relation 
Php :: rename migration in laravel 
Php :: if text contains word then in php 
Php :: mysql count rows php 
Php :: format datetime ISO php 
Php :: create wordpress user programatically 
Php :: laravel gigapay 
Php :: ci db query error 
Php :: wp get post author link 
Php :: laravel date default now 
Php :: laravel check if table has column 
Php :: publish config laravel 
Php :: laravel where update query 
Php :: how to create new project in laravel 
Php :: install phpUnit in php by composer 
Php :: slug in php 
Php :: pagination prestashop 1.7 
Php :: [DoctrineDBALDBALException]Unknown database type enum requested, DoctrineDBALPlatformsMySqlPlatform may not support it. 
Php :: absolute path php 
Php :: laravel add item to array 
Php :: laravel where like 
Php :: php delete element from array 
Php :: php http_build_query 
Php :: php array all keys empty 
Php :: get the content from post id wordpress 
Php :: return last inserted id in laravel 
Php :: array_last in laravel 8 
Php :: concat function using laravel update query 
Php :: laravel blade upper case 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =