I have seen many bloggers using JavaScript to display the current day and date on their blog. However the same thing can be done using only one line of PHP. You might want to display the current date for various reasons.
For example, we often notice that News Blogs display the current date at the top of the site. Personally I find it quite useful because I am the type of person to always forget the date of the month.
So to display the current date, here is the php code:
<?php echo date('l jS F Y'); ?>
The above code will display the date as: – The “date” function of Php can be modified to further suit your need. You can read more about the date and time customization here and here.



{ 1 comment… read it below or add one }
This can change many things as you can do some css styling to put the date within an image. I see many sites doing this and it’s not as hard as one thinks.