PHP Web Development

How to get yesterday and tomorrow date in php

Syntax for getting yesterday using php

<?php
echo "Yesterday Date : ";
echo date("Y-m-d",strtotime("yesterday"));
?>

Syntax for getting tomorrow using php

<?php
echo "Tomorrow date :";
echo date("Y-m-d",strtotime("tomorrow"));
?>

 

About the author

Anuj kumar

I'm Anuj kumar a web developer with 4+ year experience .I write blogs in my free time. I love to learn new technologies and share with others. I founded PHPGurukul in September 2015. The main aim of this website to is provide php , jquery , mysql , phpoops and other web development tutorials. I am trying best effort to make PHPGurukul useful for every single moment spend on this website. If you think this website is useful to visit please share with your friend and buddies.

Leave a Comment