How to set date in PHP? Subash Chandran 15th November 2021 Leave a Comment <?php $str = 'Tue Dec 15 2009'; $timestamp = strtotime($str); echo $timestamp; //output: 1260831600 ?> Curly hair, very fair, please share 🙂Click to share on Twitter (Opens in new window)Click to share on Facebook (Opens in new window)Click to share on Reddit (Opens in new window)Click to share on Telegram (Opens in new window)Click to share on WhatsApp (Opens in new window)Click to email a link to a friend (Opens in new window) Related See also Python code snippet - How to find highest number in list ? Snippets How to set date in PHP? Change font size A Decrease font size. A Reset font size. A Increase font size.