Adding or Subtracting Time
$dateTime = new DateTime('2016-01-01');
$dateTime->modify('+1 day');
echo $dateTime->format('Y-m-d H:i:s');`
# Output: 2016-01-02 00:00:00
# You can as well use the constructor if you work on the current date:
$dateTime = new DateTime('+1d');
echo $dateTime->format('Y-m-d H:i:s');`
# Output the current date plus one day.
Also in PHP:
- composer what to do get created laravel new project
- debug native php
- $get url php
- cronjob cakephp
- array key is true
- display all php erros
- base64 encode and decode in php
- composer install in laravel project
- change from all caps to sentence case in php
- error e all php
- base 64 encode decode not same php
- acheck key exist in array php
- 0 == "string" php
- decode ' php
- apt install php7.4-mbstring php7.4-zip php7.4-xml
- Cannot access protected property Slim\Slim::$mode in
- ajax call php
- check text is in string or not php
- You are *required* to use the date.timezone setting or t
- Fatal error: Allowed memory size of 1073741824 bytes exhausted (trie
- convert dd/mm/yyyy to yyyy-mm-dd in mysql php
- detect keyword of php string
- date("Y/m/d h:i:s") php
- array_reverse in php