Example PHP strtotime

February 16, 2008 – 1:48 pm

Just in case… here are some helpful strtotime examples:

echo strtotime(”now”), “\n”;
echo strtotime(”10 September 2000″), “\n”;
echo strtotime(”+1 day”), “\n”;
echo strtotime(”-1 days”), “\n”
echo strtotime(”+1 week”), “\n”;
echo strtotime(”+1 week 2 days 4 hours 2 seconds”), “\n”;
echo strtotime(”next Thursday”), “\n”;
echo strtotime(”last Monday”), “\n”;

Source:

Post a Comment