PHP MySQL ebook
February 12, 2011 – 4:57 pm | No Comment

Hey everyone!!
With this section I hope to share with you resources which I have tried and valued
So you’re new to PHP and want to learn from scratch. Well I was in your position not too …

Read the full story »
SEO Tutorials

Need help with Search Engine Optimisation? This is the place to look for the latest tips and hints with the advice we offer. Keep an eye out here for the latest posts.

PHP Tutorials

Learn how to code with PHP to achieve your goal. In here I aim to show and teach you about little tips and tricks that should enhance your coding abilities

Flash Tutorials

Learn how to use Adobe Flash for your own purposes. Little tips and hints to help you along

Website Development

In here I aim to help you with developing your website from scratch. Come here for various tips and pieces of advice to help you build and improve your website.

Home » PHP Tutorials

Date()

Submitted by on July 29, 2007 – 3:19 pmNo Comment

This is a very good function that can be used to date anything from last login to date adding a specific post. It is used in PHP 4 and 5. It is a relatively easy function to use because it goes like this:

PHP:
  1. date("parameters");

but its no use like this so we make it part of a variable

PHP:
  1. $date = date("parameters")

the parameters you put inside are specific and are in the table below. i got this table from the PHP official site: http://uk.php.net/date

you can also easily format time so this:

PHP:
  1. date('l dS \of F Y h:i:s A');

will give Monday 12th of November 2005 1:04:46 PM

I hope you find this helpful

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: 0 (from 0 votes)

Popularity: unranked [?]

Leave a comment!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.