Get the timestamp of exactly one week ago in PHP?

前端 未结 6 1138
一整个雨季
一整个雨季 2021-02-05 00:55

I need to calculate the timestamp of exactly 7 days ago using PHP, so if it\'s currently March 25th at 7:30pm, it would return the timestamp for March 18th at 7:30pm.

Sh

6条回答
  •  伪装坚强ぢ
    2021-02-05 01:27

    
    

    you can also use the string to time function for converting the date to timestamp. like

    strtotime(23-09-2013);
    

提交回复
热议问题