How to show yesterday's date on the webpage with PHP in this format?
"December 27, 2008"
Anyone could help out?
janharders
12:21 pm on Dec 28, 2008 (gmt 0)
[php.net...] will get you the syntax ... it requires you to pass a timestamp as an argument - just use time() - 86400 (one day has 86400 seconds, so now - 86400 always results to the same time on the day before)
date ( "F d, Y", time() - 86400 )
should do the job
Habtom
12:26 pm on Dec 28, 2008 (gmt 0)
... or simply date ("F d, Y", strtotime("yesterday"));
damlag
12:56 pm on Dec 28, 2008 (gmt 0)
Hey thanx Janharders,
I don't know any programming, but You sort of put it on the plate :-)