datetime php difference in days
<?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'));
?> // add 1 day to the date above
$n = date('Y-m-d', strtotime( $d . " +1 days"));
// add 1 month to the date above
$n = date('Y-m-d', strtotime( $d . " +1 month"));
// add 1 year to the date above
$n = date('Y-m-d', strtotime( $d . " +1 year"));
// subtract 1 day to the date above
$n = date('Y-m-d', strtotime( $d . " -1 days"));
// subtract 1 month to the date above
$n = date('Y-m-d', strtotime( $d . " -1 month"));
// subtract 1 year to the date above
$n = date('Y-m-d', strtotime( $d . " -1 year"));
Also in PHP:
- check string php
- check where key in associative array have a value
- AWS HTTP error: SSL operation failed with code 1. OpenSSL Error messages: error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed
- check if word belongs in string
- check variable type in laravel
- create migration, controller, model and seeder laravel
- array key exists and is true
- basd64 decrtpy php
- array key search php
- create seed file laravel
- check string for value php
- acf get row index
- datetimepicker format php
- base64 to image
- Eloquent Query Scope on Relationships
- Illuminate\Contracts\Container\BindingResolutionException Target class [SlugController] does not exist.
- clear cache manually laravel
- all php error report
- composer clear cache laravel
- composer artisan
- PHP Warning
- check if substring exists in string php\
- composer remove laravel
- exclude php