add a day to date php
<?php
$stop_date = '2009-09-30 20:24:00';
echo 'date before day adding: ' . $stop_date;
$stop_date = date('Y-m-d H:i:s', strtotime($stop_date . ' +1 day'));
echo 'date after adding 1 day: ' . $stop_date;
?><?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:
- CONVERT STRING TO DECIMAL php
- create a new project larave
- detect mouse click javascript
- Failed at the @ dev script 'node_modules/cross-env/bin/cross-env.js NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js'.
- Woocommerce Display Custom Field value on the Thank You page [Custom Field Display 2]
- convert a value to a float in php
- char exists in string php
- Delete Query with Where Condition in Codeigniter
- ext-dom php
- date('r') php
- detect the datatype of a value php
- date_create php format
- create seeds laravel
- dmY PHP
- cache resource laravel
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". when php is 7.4
- php sting to lower case
- currentdate in unix php
- create random password with refresh in php
- Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Seeder' not found
- array filter remove duplicates multidimensional php
- array php missing key
- check if an element in array is accesetphp
- errpr reporting in php