adding days to data 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:
- acf show the taxonomy image
- clear all cache laravel server
- caracter_creator.phpif in string
- create database seeder in laravel
- delete in wordpress query
- date F month php
- find str in str php
- How I can disable update at in eloquent
- create random string using php
- Modularizing laravel 8.0
- Call to undefined function str_limit() laaravel8
- echo all errors
- console log php
- display only errors php
- Allowed memory size of 1610612736 bytes exhausted larave lvalet composer
- 500 error code laravel
- convert string into non capital letters php
- check if string contains specific string php
- RuntimeException: No application encryption key has been specified.
- fetch data based on month and year in laravel
- factorial function php
- current date to timestamp php
- count variable lenth in php
- Your Composer dependencies require the following PHP extensions to be installed: dom, mbstring, xml, xmlwriter