Programming Tips - PHP: How can I get the current date as a string?

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 ?>