PHP Knowledge Base

Get and Format Current Date Using date()

php:
<?php
$current_date__pretty = date("D, M d, Y");
?>
HTML:
<p>Current date: <?=$current_date__pretty?></p>
Result:
Current date: Thu, Oct 31, 2024