adding days to time value in php
$date = new DateTime('2000-01-01');
$date->add(new DateInterval('P1D'));<?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:
- date math sql php
- curl_multi_exec
- change time format in php
- catch new exception php
- create laravel project version 5.8
- clear catche laravel
- check if string contains a character php
- codeigniter echo last query
- 12:30 am time format validation in laravel
- array key xists
- $this->validate($request,[ 'name' => 'required|unique:categories', 'images' => 'required|mimes:jpeg,bmp,png,jpg'
- fgets in php ommit new line
- array_search in php
- check var type php
- defaultStringLength laravel
- console.log from functions php
- array search not exists
- How to execute “php artisan migrate” and other Laravel commands in remote server?
- PHP Startup: Unable to load dynamic library 'curl'
- cakephp extract array
- PHP message: PHP Fatal error: Uncaught TypeError: Argument 2 passed to Magento\Eav\Model\Attribute\Data\Text::validateLength() must be of the type string, null given
- php random string generator
- clear all laravel caches
- errors off php