Skip to content

Collection of Helpful Guides & Tutorials!

Collection of Helpful Guides & Tutorials!
Menu
  • Home
  • C#
    • Tutorials
    • C# Projects
    • Q & A
  • HTML5
  • CSS3
  • PHP
    • Tutorials
    • Q & A
  • SQL
  • JavaScript
    • Tutorials
    • Q & A
  • jQuery
    • Tutorials
    • Q & A
  • Bootstrap
  • Guides
  • Tools
December 20, 2015
HomePHP QuestionsHow to Add 1 Year in Date in PHP

How to Add 1 Year in Date in PHP

By Krishnaa PHP Questions  0 Comments

Sample code is given below, where we are adding 1 year to the current date.

<?php

$today = date("Y-m-d");

$oneyear = date('Y-m-d', strtotime($today. ' + 1 year'));

echo $oneyear;
?>

 

 
         

You May Also Like:

How to Get Current Year in C#/CSharp How to Check if Date is Less Than Current Date in Javascript In this tutorial, you will learn how to display current date and time in javascript.  If you are in web development, then it is pretty much common that here and there you will encounter a situation where you have to display the date and time to your website visitors. A good example can be displaying the date and time when a certain post was published.How to Display Current Date and Time in Javascript How to Find Yesterday’s Date in Javascript How to Validate Date in Javascript

Recent Posts

  • How to Insert Dash After Every Character in Input in Javascript
  • How to Insert Dash After Every 2nd Character in Input in Javascript
  • How to Insert Dash After Every 3rd character in Input in Javascript
  • How to Add Space After Every 4th Character in Input in Javascript
  • How to Insert Space After Every 4th Character in Input in Javascript
Privacy Policy
Collection of Helpful Guides & Tutorials! Copyright © 2023.
Back to Top ↑