add 10 days 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'));
?>
Also in PHP:
- check if contains ph
- date inphp
- array_reverse function in php
- calculate total time from start and end datetime in php
- associative array example
- command to install php5.4 in ubuntu 18.04
- cache out en laravel
- euclid algorithm
- TEXT UPPER PHP
- create new projec in laravel
- How do I clear laravel cache online?
- codeigniter 4 radio button isset
- check if value contain letter php
- create DateTime from timestamp php
- convert uppercase in php
- array_reverse in php
- create a laravel 7 project
- ->with('success'
- codeigniter get lst inserted id
- echo ternary php
- add zeros in front of number php
- base64_decode() output to header location
- Cannot access protected property Slim\Slim::$mode in
- Target class does not exist.