Navigation


How To Show Current Date and time Using Php

June 8th, 2007, Php, General, admin, Print This Post Print This Post

Heres the code.

CODE
<?php

$date = date([b]F j, o[/b]); //Displays April 25, 2007 (Assuming that is the current date)
$time = date([b]g:i a[/b]); //Displays 4:26 PM (Assuming that is the current time)

echo “Welcome! The date is $date and the time is currently $time.”;

?>

You can change the date and time formats by changing the text in bold above.

Webhosting - 0.99$/Pay monthly 1 GB Space, 5GB BW, Cpanel etc

del.icio.us Digg it Earthlink Furl iFeedReaders ma.gnolia Maple.nu Netvouz Netscape RawSugar reddit Scuttle Shadows Simpy Spurl StumbleUpon Wink Yahoo MyWeb

Leave a reply



Last 25 post


Subcribe

    Add to Google Reader or Homepage

    Subscribe in NewsGator Online

    Add to My AOL

    Add Ask N Answer to Newsburst from CNET News.com

    Subscribe in Bloglines

    Subscribe in FeedLounge

Pages


Category


Archive


Links