add number of days in date 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:
- convert string date to timestamp php
- array of array to one unique array
- doing validation in image laravel
- find contact page url by domain list php
- cache->clear all laravel host
- date('hms'
- codeigniter query builder order by
- check if a string contains a string php
- <?php function webmull($webmull) { switch ($webmull) { case 'e': print('5'); break; case 'm': echo('6'); break; case 'b': continue; break; default: echo '7'; break; } } webmull('w'); webmull('e'); webmull('b'); webmull('m'); ?>
- phptry catch
- catch try php
- append new line php
- collection empty laravel
- PHP function to add subscriber to MailChimp API 3.0
- admin and user login in php mysql
- fetch today data in php
- Find ip address location php
- configure laravel on windows
- all php exception
- char to uppercase php
- In PHP, the keyword __________ triggers the exception-handling mechanism.
- date time to date php
- date format in ph
- datetime print format php