Definition
The strtotime() function parses an English textual datetime into a Unix timestamp.
Syntax
strtotime(time, now)
Parameters
Parameter | Description |
---|---|
time |
Required. Specifies a date/time string. |
now |
Optional. Specifies the timestamp used as a base for the calculation of relative dates. |
Example
<?php
echo(strtotime("25 december 2021"));