Solved

PHP date and time code

Posted on 2006-07-03
4
417 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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Consider the following scenario: You are working on a website and make something great - something that lets the server work with information submitted by your users. This could be anything, from a simple guestbook to a e-Money solution. But what…
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to count occurrences of each item in an array.

707 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now