add a day in date function in php
<?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:
- count duplicate in array and delete using php
- The "App\Entity\ entity has a repositoryClass set to but this is not a valid class.
- console rint in php method
- check if the string match in php
- cron run php script
- DB::connection() for php
- Exception #0 (Magento\Framework\Exception\ValidatorException): Invalid template file:
- extend php maximum execution time
- array unique values
- create model, controller and migration in single command laravel
- What parameter should you enable if you wish for your browser to show all errors?
- check if string is in string php
- date method php
- detectar comienzo cadena php
- change background color with user option
- date f
- calculate string length php
- date parameter in php
- divisible by 2 php output numbers
- add redirect php
- 01 july 2020 php date format
- convert timestamp to datetime php
- check if astring is apart of another string in php
- convert array to array