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 :: get relationship data from soft delete laravel 
Php :: how to get correct file or content mime type using/in php 
Php :: php is defined 
Php :: how can we check in the table in comma separated values in laravel 
Php :: symfony change php version 
Php :: php echo variable 
Php :: uuidv4 php 
Php :: php sort hight to low 
Php :: features of PHP7 
Php :: php ternary shorthand 
Php :: get type of object in php 
Php :: laravel retry specific failed job 
Php :: how to pass parameter in routes of laravel 
Php :: php encrypt decrypt url parameters 
Php :: laravel call controller method from view 
Php :: php strict mode 
Php :: php migrate comand 
Php :: laravel: get last id 
Php :: Warning: sprintf(): Too few arguments in /opt/lampp/htdocs/wordpress/wp-admin/includes/class-bulk-upgrader-skin.php on line 152 
Php :: appserviceprovider laravel auth user 
Php :: PHP Fatal error: Allowed memory size of 134217728 bytes exhausted 
Php :: laravel multiple paginate 
Php :: random element in faker 
Php :: error_log wordpress 
Php :: laravel seeding with relationships 
Php :: how to add custom field in comment form in wordpress 
Php :: learndash edit profile link 
Php :: ver version de php en linux 
Php :: laravel vue 
Php :: url() inside laravel config files 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =