Solved

PHP date and time code

Posted on 2006-07-03
4
422 Views
Last Modified: 2008-02-01
What's the PHP code to include time and/or date etc into a php page so that it would look somethink similar to:

Sunday, 1st December 2005 18:45 GMT?

Thanks
0
Comment
Question by:mpaert
  • 2
4 Comments
 
LVL 49

Accepted Solution

by:
Roonaan earned 500 total points
ID: 17032382
Try:

echo date('l, jS F Y H:i e');

-r-
0
 
LVL 14

Expert Comment

by:ThG
ID: 17033230
or you can use strftime() for localized version, using setlocale("your_locale_here");

http://it.php.net/strftime
0
 
LVL 11

Expert Comment

by:neester
ID: 17034047
echo date('r')
0
 
LVL 11

Expert Comment

by:neester
ID: 17034053
0

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Since pre-biblical times, humans have sought ways to keep secrets, and share the secrets selectively.  This article explores the ways PHP can be used to hide and encrypt information.
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question