add days to current date php
$new_time = date("Y-m-d H:i:s", strtotime('+5 hours'));$date = "Mar 03, 2011";
$date = strtotime($date);
$date = strtotime("+7 day", $date);
echo date('M d, Y', $date);$date = new DateTime('2020-11-24');
$date->add(new DateInterval("P9D"));
echo $date->format('Y-m-d');<?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:
- custom time php function
- find first occurance of sentence in a string php
- check if a key is in an array
- calculate person age by birthdate php
- datetime::timeformat php
- How to display MySQL data dynamically using jQuery and PHP
- all the ways to address a page in php
- display error on screen
- Allowed memory size of 1610612736 bytes exhausted (tried to allocate 40 bytes) in phar:///opt/cpanel/composer/bin/composer/src/Composer/DependencyResolver/RuleSetGenerator.php on line 129
- array_key_exists() function
- FORMATA DATA COM PHP
- filter array in php with passing extra params
- To add a new Top-level menu to WordPress Administration, use the add_menu_page() function.
- declare empty array php
- echo php dropdown from db and save it in a db
- Composer detected issues in your platform: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.33.
- PHP text string contains character
- current time in php
- check if is key in array php
- alter seeder in laravel
- codeigniter get num_rows
- create new larael project 7
- Call Python From PHP And Get Return Code
- exit and echo php