strtotime()
รูปแบบ
int strtotime ( string time [, int now] )
เป็น function ที่ เปลี่ยน ตัวอักษร ( รูปแบบของ วัน เป็น ตัวหนึ่งสือ ) เป็น Unix timestamp
ตัวอย่าง เช่น
<?php
echo strtotime("now"), " ";
echo strtotime("10 September 2000"), " ";
echo strtotime("+1 day"), " ";
echo strtotime("+1 week"), " ";
echo strtotime("+1 week 2 days 4 hours 2 seconds"), " ";
echo strtotime("next Thursday"), " ";
echo strtotime("last Monday"), " ";
?>
ตามตัวอย่าง
<?php
echo strtotime("now"), " "."strtotime";
echo "<hr>";
echo time()." time()";
?>
ผลที่ได้