add day to date 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'));
?>$date = new DateTime('2020-11-24');
$date->add(new DateInterval("P9D"));
echo $date->format('Y-m-d');
Also in PHP:
- array distinct php
- 2 = null laravel
- app clear cache in laravel
- all cache clear laravel
- The PHP __________ function formats a timestamp to a more readable time.
- Using a variable outside of the while loop (scope)
- eader("Location
- In PHP, the keyword __________ triggers the exception-handling mechanism.
- delete seed laravel
- calculate total time from start and end datetime in php
- convert string to uppercase php
- can i refresh page in php
- codeigniter base_url
- alerta con php
- echo header in php
- create a button add in laravel
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) laravel
- display product page title in field cf7
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". when php is 7.4
- errors register
- array unicode php
- check if in array php key
- convert uppercase to capitalize in php
- all error in php