Copyright © 2008-2018, dave - Code samples on Dave's Brain is licensed under the Creative Commons Attribution 2.5 License. However other material, including English text has all rights reserved.
Date: 2017nov25 Language: php Q. php: How can I get the current date as a string? A. Use the date() function:<?php print date('Y-m-d'); // eg 2020-12-31 print strtolower(date('YMd')); // eg 2020dec31 ?>
Add a commentSign in to add a comment