add a date in php date
<?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:
- do I have to pass a path in html get request
- day - inphp
- Extra header element 'From' cannot be other than string or array. in
- codeigniter check affected rows
- apagar cache laravel
- date ymd php
- add admin menu link custom wp
- date format in php function
- error reporting in php
- Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 18874368 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/Repository/ComposerRepository.php on line 588
- array_values() in php
- display the type in php
- create folder using php
- check composer php version
- DateTime TO UNIx timestamp PHP
- clearing cache on live site laravel
- check json key exists php
- create foreign key laravel migration
- base64 decode php function
- convert timestamp to date time in php
- cannot add foreign key constraint laravel
- acf get field
- create a seeder in laravel
- array_intersect php