date add 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'));
?> $date = new DateTime('2000-01-01');
$date->add(new DateInterval('P1D'));<?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:
- connection error php default exception code
- ->store() laravel change name
- Best documentation tools for php
- exceptionhandling php
- error init php eroirrs
- echo err in php
- HTML form, add the data into it and submit it to the database by connecting it to MySQL database using PHP.
- alias wipedb='php artisan db:wipe'
- alpha numeric to upper case in php
- base64_encode decode php
- clear cache in php artisan
- create date from string php
- delete all laravel cache
- divide page in pdf with page break using php
- $name = $name; "Robert" echo;
- error show php
- DB::connection() for php
- error php code
- echo current time user php
- The only supported ciphers are AES-128-CBC and AES-256-CBC with the correct key lengths.
- Laravel Eloquent, group by month/year
- codeigniter how to know update failed
- define header in different file php
- $ php artisan clear cache