This tutorial will help you in finding any day before a given date using simple php trick.Just look at the code below.
The script will take the server date as current day and will negate it against the number of days provided. Here i have given 1. You can give any number according to your convenience.

$previous_day = date('m/d/Y', strtotime('-1 days'));
echo $previous_day;

Here our output will be 04/18/2011 [SINCE I HAVE RUN IT ON 04/19/2011]

Leave a Reply

Your email address will not be published. Required fields are marked *