Advertisement
Archive for June, 2008
How to Show date using PHP Strftime
In this tutorial, I am going to tell you how to show current date using PHP builtin function strftime();
It is very easy, you just need to pass some parameters to this function, which format the date.
In this tutorial, I will teach you how to show date in this format : Day, date month, Year.
For Example:
Thursday, 19 June , 2008
Well, as I said above, it is really easy.
You just put this PHP snippet on the page where you want the date to be shown:
PHP Code:
<?php
$date = strftime("%A, %d %B, %Y");
?>
And then, where ever you want to show the date, you just write this little text :
PHP Code:
<?php
echo $date;
?>
And thats it guys, pretty easy, isnt it?
Tutorials
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 17 2008 | Views: 428
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 17 2008 | Views: 350
Category: Misc Tutorials
Author: Bilal Ghouri Date: Jun 15 2008 | Views: 601
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 13 2008 | Views: 333
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 09 2008 | Views: 681
Category: XHTML and CSS Tutorials
Author: Bilal Ghouri Date: Jun 02 2008 | Views: 852