All you have to do is use days
instead of day
like this:
<?php $Date = "2010-09-17"; echo date('Y-m-d', strtotime($Date. ' + 1 days')); echo date('Y-m-d', strtotime($Date. ' + 2 days')); ?>
And it outputs correctly:
2010-09-18 2010-09-19
Related Posts:
- Converting string to Date and DateTime
- Compare given date with today
- How to reformat date in PHP?
- How to find the date of a day of the week from a date using PHP?
- Convert a date format in PHP
- How to find the last day of the month from date?
- how to get date of yesterday using php?
- What is the MM/DD/YYYY regular expression and how do I use it in php?
- Subtracting days, months or years from date using php
- How to get time difference in minutes in PHP
- A non well formed numeric value encountered
- PHP date yesterday [duplicate]
- How do I make a redirect in PHP?
- List of All Locales and Their Short Codes?
- Whoops, looks like something went wrong. Laravel 5.0
- PDOException SQLSTATE[HY000] [2002] No such file or directory
- How do I check if a string contains a specific word?
- Get the full URL in PHP
- Invalid column count in CSV input on line 1 Error
- How to copy a file from one directory to another using PHP?
- How to check if a string starts with a specified string?
- How can I find my php.ini on wordpress?
- PHP + curl, HTTP POST sample code?
- How to call a JavaScript function from PHP?
- Error 500: Premature end of script headers
- Cookies vs. sessions
- $wpdb->update or $wpdb->insert results in slashes being added in front of quotes
- PDO with INSERT INTO through prepared statements
- How do I use PHP to get the current year?
- How to get the file extension in PHP?
- Multiple file upload in php
- When should I use ‘self’ over ‘$this’?
- Make a HTTPS request through PHP and get response
- php create object without class
- How do the PHP equality (== double equals) and identity (=== triple equals) comparison operators differ?
- Creating a search form in PHP to search a database?
- How do I make a simple crawler in PHP?
- Create PDF file using PHP
- Sort array of objects by object fields
- When to generate a new Application Key in Laravel?
- “Connection for controluser as defined in your configuration failed” with phpMyAdmin in XAMPP
- Call to undefined method mysqli_stmt::get_result
- Replace spaces with a dash in a URL
- Are PDO prepared statements sufficient to prevent SQL injection?
- Message: Trying to access array offset on value of type null [duplicate]
- retrieve data from db and display it in table in php .. see this code whats wrong with it?
- What does it mean to escape a string?
- Creating default object from empty value in PHP?
- Send attachments with PHP Mail()?
- header location not working in my php code
- PHP Error: Function name must be a string
- Uncaught Error: Call to undefined function mysql_escape_string()
- Warning: file_get_contents(): https:// wrapper is disabled in the server configuration by all
- Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in
- Convert DateTime to String PHP
- Warning: mysqli_query() expects at least 2 parameters, 1 given. What? [duplicate]
- Xampp Access Forbidden php
- PHP cURL custom headers
- File attachment with PHPMailer
- Warning: mysqli_query() expects parameter 1 to be mysqli, resource given
- Fatal error: Call to undefined function money_format()
- Mysql where id is in array
- XAMPP, using port:81, cannot run localhost:81/mywebsite
- How to extract and access data from JSON with PHP?
- Warning “Do not Access Superglobal $_POST Array Directly” on Netbeans 7.4 for PHP
- How to integrate WordPress with Angular 8 for website?
- Fatal error: Maximum execution time of 30 seconds exceeded
- cURL request in Laravel
- PHP array printing using a loop
- How to send to BCC address when using PHPMailer to format MIME message for Gmail API?
- Is there any way to test PHP locally without installing a server?
- PHP Redirect with POST data
- Getting the screen resolution using PHP
- PHP: fopen() Permission denied
- How should I be setting browscap.ini file
- CodeIgniter: Unable to connect to your database server using the provided settings Error Message
- Returning JSON from a PHP Script
- How to run a PHP function from an HTML form?
- Can I store images in MySQL
- MySQL Daemon Failed to Start – centos 6
- How to insert TIMESTAMP into my MySQL table?
- How to remove index.php from WordPress site URL
- How to generate .json file with PHP?
- Call to a member function on a non-object [duplicate]
- Generate PDF from HTML PHP
- Call to a member function fetch_assoc() on boolean in
[duplicate] - How to use Memcached with PHP7?
- Remove empty array elements
- select count(*) from table of mysql in php
- Auto increment in phpmyadmin
- POST an array from an HTML form without javascript
- wordpress menu dropdown item not showing after first dropdown
- WP_Query meta_query results date by date
- Converting Y-m-d to a date with a Month name? [closed]
- Possible to edit custom date field and display?
- Get posts from year from URL
- Can’t add to time? [closed]
- Grouping posts by date
- WordPress change post date format from english to japanese
- Adding a number to a date