Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php add days to date

<?php  
   
$date = "2022-08-12"; 
  
// Add days to date and display it 
echo date('Y-m-d', strtotime($date. ' +10 days'));  // 2022-08-22
echo date('Y-m-d', strtotime(date('Y-m-d'). ' +1 days')); 	// 2022-08-23
echo date('Y-m-d', strtotime(date('Y-m-d'). ' +1 months')); // 2022-09-12
echo date('Y-m-d', strtotime(date('Y-m-d'). ' +1 year'));	// 2023-08-12
  
?> 
Comment

add 7 days to date php

$date = "Mar 03, 2011";
$date = strtotime($date);
$date = strtotime("+7 day", $date);
echo date('M d, Y', $date);
Comment

Add 2 days to the current date in PHP

<?php
  $result = date('d.m.Y', strtotime('+2 day', time()));

  echo $result;
?>
Comment

php add days to date

$start_date = "2015/03/02";  
$date = strtotime($start_date);
$date = strtotime("+7 day", $date);
echo date('Y/m/d', $date);
Comment

Add 7 days to the current date in PHP

<?php
  $result = date('d.m.Y', strtotime('+7 day', time()));

  echo $result;
?>
Comment

Add 5 days to the current date in PHP

<?php
  $result = date('d.m.Y', strtotime('+5 day', time()));

  echo $result;
?>
Comment

PREVIOUS NEXT
Code Example
Php :: laravel blade auth user 
Php :: floor ceil php 
Php :: how to create a get route in Laravel 
Php :: diff for seconds laravel carbon 
Php :: php sort array by key 
Php :: php check if associative array is null 
Php :: oci_execute(): ORA-01810: format code appears twice in 
Php :: php iterate array keys 
Php :: wordpress get date of post 
Php :: blade foreach key value 
Php :: store as real file name laravel uplaod 
Php :: php validate date format 
Php :: form validation with larvel api 
Php :: factorial program in php using recursive function 
Php :: php foreach mysql result 
Php :: joomla login link 
Php :: Invalid argument supplied for foreach() 
Php :: check file size validation laravel 
Php :: laravel if database has table 
Php :: How to install a specific version of package using Composer? 
Php :: unable to locate package php8.1 ubuntu 
Php :: laravel collection random 
Php :: php all date formats 
Php :: php routing 
Php :: laravel custom 404 blade 
Php :: php array size 
Php :: ob_start in php 
Php :: random number laravel faker 
Php :: javascript php loop 
Php :: get the content from post id wordpress 
ADD CONTENT
Topic
Content
Source link
Name
4+2 =