Tags
PHP
Asked 8 years ago
24 Nov 2016
Views 862
sec8

sec8 posted

how to get yesteraday 's date in PHP ?

how to get yesteraday 's date in PHP ?
Mitul Dabhi

Mitul Dabhi
answered Nov 30 '-1 00:00



echo date('d-m-y', strtotime("-1 day"));

strtotime function give you unix timestamp from given English text , it try to parse the English text and return unix timestamp
date function give proper format for given unix timestamp.
Post Answer