Use strtotime()
echo date('d-m-Y', strtotime("+1 week")); //1 week in the future
echo date('d-m-Y', strtotime("-1 week")); //1 week ago
More Related Contents:
- laravel 5.3 new Auth::routes()
- How to remove all numbers from string?
- How to backup MySQL database in PHP?
- how to change the array key to start from 1 instead of 0 [duplicate]
- Using namespaces in Laravel 4
- How to block Disposable Email Addresses in your website’s registration form? [closed]
- How to force page not to be cached in PHP?
- Gmail API: 400 bad request when trying to send an email (PHP code)
- MP4 plays when accessed directly, but not when read through PHP, on iOS
- How to get random image from directory using PHP
- Create PHP array from MySQL column
- Is it possible to detect a visitor’s browsing history using JavaScript or PHP?
- How do I retrieve the visitor’s ISP through PHP?
- PHP Pass Data with Redirect
- Convert Time String to Decimal Hours PHP [closed]
- Parsing HTTP_RANGE header in PHP
- Fatal error: Unsupported operand types
- How do i search from serialize field in mysql database?
- phpmailer send gmail smtp timeout [duplicate]
- Allowing users to Refresh browser without the “Confirm Form Resubmission” pop-up
- Dynamically bind mysqli_stmt parameters and then bind result
- ftp_put is corrupting my movies after transfer, is it wrong?
- What is the PDO equivalent of function mysql_real_escape_string?
- How to insert into MySQL using mysqli
- What are the valid characters in PHP variable, method, class, etc names?
- Installing PDO driver on MySQL Linux server
- PHP: Date larger than current date
- How can you use php in a javascript function [duplicate]
- Undefined index error PHP
- How can I create custom SEO-friendly URLs in OpenCart?