adddays to 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:
- [WAR] 70 (lib\peer.php:164) file_get_contents(): SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- count array php
- NAME OF YOUR FORM in contact form 7
- eloquent first
- error text encode php json
- create project larave
- 'Y-m-d' php
- capitalize letter in php
- append variable into string php
- array reverce php
- catch multiple exceptions php
- cron.php
- command to create seed file in laravel
- check laravel version
- element check cakphp
- filter_var filter_validate_url
- array_unique in laravel collection
- check if ajax request php
- explode a number php
- domain only request php
- cakephp login session
- array_key_exists contains string
- check if a substring exists in string php
- cache in laravel