yesterday date in php – How to Get Yesterday Date in PHP?

yesterday date in php and and display it. The PHP date function is used to format a date. here we can learn to main 2 Examples.

yesterday date in php

Get Yesterday to $Date can be done in many ways. The following source code will get yesterday’s date in php.

Example 1: yesterday date in php

how_to_get_yesterday_date_in_php.php


Result

2022-11-12

don’t miss : Subtract Hours From DateTime In PHP

Example 2: how to get yesterday’s date in php

how_to_get_yesterday_date_in_php.php


Result

2022-11-12

I hope you get an idea about yesterday’s date in php.
I would like to have feedback on my infinityknow.com.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Leave a Comment