add days with dates 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:
- 2 days in php
- alias seeddb='php artisan db:seed'
- check if substring php
- Illuminate\Http\Request vs \Illuminate\Support\Facades\Request
- Target class does not exist.
- convert time to string in php
- date and time function in php
- check if word exist in string
- check chartercount in php
- check if contains ph
- convert int to string php
- count characters php
- check in string is part oof other string php
- array key xists
- ReactPHP
- TEXT UPPER PHP
- You are *required* to use the date.timezone setting or t
- check if key array php
- 1071 Specified key was too long; max key length is 1000 bytes (SQL: alter table `shoppingcart` add primary key `shoppingcart_identifier_instance_primary`(`identifier`, `instance`))
- current datae in php
- Warning: mail(): Failed to connect to mailserver at "localhost" port 25, verify your "SMTP" and "smtp_port" setting in php.ini or use ini_set() in C:\xampp\htdocs\PPETrackerApp\email.php on line 21
- cakephp extract array
- $get url php
- associative array rev in php