PHP - Date & Timestamp Snippets

Aus Wikizone
Version vom 15. Oktober 2018, 16:16 Uhr von Steff (Diskussion | Beiträge) (Die Seite wurde neu angelegt: „ Datum (String) in Timestamp umwandeln For recieving page of today, you would have to create a start and end time range and use them in the selector. <syntaxh…“)
(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

Datum (String) in Timestamp umwandeln

For recieving page of today, you would have to create a start and end time range and use them in the selector. <syntaxhighlight lang="php"> $start = strtotime( date('Y-m-d') . " 00:00:00"); $end = strtotime( date('Y-m-d') . " 23:59:59"); </syntaxhighlight haven't tested it but should work along these lines