programming faqs interview questions tech technical educational freshers guide preparation interviews hr telephonic
try another color:
try another fontsize: 60% 70% 80% 90%
Programming FAQs

How to get yesterday date and time in php

Using Date and mktime

Using Date and mktime function we can get the date

It prints the Yesterdays' date
echo date('Y-m-d H:i:s', mktime(date('H'), date('i'), date('s'), date("m") , date("d")-1 , date("Y")));

Tomorows Date

echo mktime(0, 0, 0, date("m") , date("d")+1, date("Y"));

Today

echo date('Y-m-d');