Search
 
SCRIPT & CODE EXAMPLE
 

PHP

php date strtotime add 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"));
Comment

php strtotime plus 1 day

$NewDate = date('Y-m-d', strtotime('+7 days'));
Comment

PREVIOUS NEXT
Code Example
Php :: sql where count greater than 
Php :: laravel encrypt decrypt 
Php :: laravel eloquent merge request 
Php :: make a seeding file in laravel 
Php :: convert date in php 
Php :: yii2 advanced nginx 
Php :: get contents of a tmp file php 
Php :: php multiple line string 
Php :: sort array by key value in php 
Php :: west african timezone in php 
Php :: laravel carbon get month number 
Php :: array merge php 
Php :: wp_mail html content 
Php :: add action wp_footer 
Php :: laravel helper function for check string is exist in another string 
Php :: Laravel Eloquent, group by month/year 
Php :: switch php version 
Php :: add dd function composer 
Php :: how to do laravel in sidebar active menu dynamic blade 
Php :: phoenix input type password 
Php :: laravel gigapay update employee 
Php :: joomla redirect 
Php :: php fwrite new line 
Php :: Wordpress SVG Manually - function.php 
Php :: php code to check if variable is null 
Php :: php json hjeader 
Php :: php error display 
Php :: show date time with milliseconds php 
Php :: php classes 
Php :: laravel-admin Model does not exists ! 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =