add days php
$date = new DateTime('2020-11-24');
$date->add(new DateInterval("P9D"));
echo $date->format('Y-m-d');<?php
// adding extra days to date
// Steps:
// 1) using carbon
// 2) using strtotime
//Step 1
$date = date('Y M d h:i:s') // 2020 09 22 22:09:26 UTC
$new_date = Carbon::parse($date->addDays(1); // adds extra day
// Step 2
$date = date('Y M d h:i:s') // 2020 09 22 22:09:26 UTC
echo $new_date = date('Y M d h:i:s', strtotime($date. '+1 day'));
?>
Also in PHP:
- fetch data from live website curl php
- check if an array contains a key php
- !strpos() php
- exact time in php
- 1054 unknown column 'updated_at' in 'field list' laravel
- create new directory php
- This behaviour is (currently) not supported by Doctrine 2
- : Allowed memory size of 268435456 bytes exhausted (tried to allocate 77155656 bytes) in /home/gergstor/public_html/seo/application/third_party/MX/Loader.php on line 373 A PHP Error was encountered Severity: Error Message: Allowed memory size of
- 'php' is not recognized as an internal or external command, operable program or batch file.
- 10 digit random number generator php
- check php version linux terminal
- check if string contains substrin php
- check if a string contains specific characters in php
- encryption and decryption in php example
- combine two query value in laravel 8
- autoload_namespaces.php failed to open stream: Permission denied
- connect to ftp server php
- excerpt custom post type
- bind in pdo
- artisan clear template cache
- * in array key php
- Column not found: 1054 Unknown column 'updated_at'
- creating laravel website
- detect right click js