add days in php
<?php
// PHP program to add days to $Date
// Declare a date
$date = "2019-05-10";
// Add days to date and display it
echo date('Y-m-d', strtotime($date. ' + 10 days'));
?> <?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:
- <?php if ( is_home()
- die php prnint error
- Composer detected issues in your platform: Your Composer dependencies require the following PHP extensions to be installed: fileinfo
- codeigniter get user ip
- How do I check if a string contains a specific word php
- convert any phone number in us number format php
- add seconds to datetime php
- array_unique array to string conversion
- codeigniter 3 insert
- create model in laravel command line
- exception class list for all server error in laravel
- check value contains numbers or letters php
- convert to string php
- check if home page wordpress
- __dir__ in php
- convert time() to date php
- disable updated_at laravel
- clear cache routes laravel
- Syntax error or access violation: 1071 Specified key was too long; max key lengt
- check if substr exist php
- create new directory php
- @lang laravel blade
- array reverse order php
- Create image data URIs (base64) using PHP Raw