Skip to Main Content
PHP and MySQL™ Phrasebook
book

PHP and MySQL™ Phrasebook

by Christian Wenz
October 2012
Intermediate to advanced content levelIntermediate to advanced
360 pages
4h 57m
English
Addison-Wesley Professional
Content preview from PHP and MySQL™ Phrasebook

3. Date and Time

Most of the time, the date and time functionalities of PHP 5 are used for printing out the current date and time—to pretend that the Web page is up-to-date. (You would be surprised how many larger Web sites actually use this.) But apart from that, working with date and time in PHP offers many other possibilities, most of which you will find in this chapter. As of PHP version 5.2, the completely new DateTime extension was added to the PHP core. Of course, this does not affect existing functionality, which continues to work fine, but there are some new features, some of them also covered in this chapter.

First, though, it seems appropriate to take a look at the PHP function that is probably used the most for working with dates: ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

PHP 7 Programming Blueprints

PHP 7 Programming Blueprints

Jose Palala, Martin Helmich

Publisher Resources

ISBN: 9780133040340Purchase book