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

Highlight Current Active Navigation Link - Step 2 - PHP
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 17 2008 | Views: 428
Highlight Current Active Navigation Link - Step 1 - Xhtml and Css
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 17 2008 | Views: 350
How to remove write protection from USB drive
Category: Misc Tutorials
Author: Bilal Ghouri Date: Jun 15 2008 | Views: 601
Display current time using PHP
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 13 2008 | Views: 333
PHP if else and if elseif else statement
Category: PHP Mysql Tutorials
Author: Bilal Ghouri Date: Jun 09 2008 | Views: 681
Make the Footer Stick to the Bottom of a Page
Category: XHTML and CSS Tutorials
Author: Bilal Ghouri Date: Jun 02 2008 | Views: 852