Archive for the ‘Reference’ Category
Learn MySQL/PHP and support Australian bush fire victims
Written by Bean on February 10, 2009 – 5:46 pmThe death toll from the bush fires in Australia is 181 and counting, but you can help. Sitepoint, an Australian web designcompany, is offering a huge sale on their excellent books. You can buy five books for the price of one and 100% of the proceeds will go to benefit the brush fire victims. The sale goes through 2/13 so you will want to take advantage of this offer quickly. The loss of home and livelihood has been staggering and the Australian brush victims are in desperate need of assistance now.
Here are some books that I think may be of particular interest for MySQL and PHP students:
The PHP Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition
Build Your Own Database Driven Website Using PHP & MySQL
HTML Utopia: Designing Without Tables Using CSS, 2nd Edition
The CSS Anthology: 101 Essential Tips, Tricks & Hacks, 2nd Edition
Build Your Own Web Site The Right Way Using HTML & CSS
The Principles of Beautiful Web Design
Once you have selected your books, be sure to use the form here to get the sale pricing and to make sure that all proceeds go to the brush fire victims.
Tags: Books, MySQL, PHP
Posted in Reference | No Comments »
PHP Date Formats
Written by Bean on August 10, 2008 – 11:14 pmThe table below shows the characters that may be used in the format string.
Each character represents a part of the formatting.
| Character | Description |
|---|---|
| a | “am” or “pm” |
| A | “AM” or “PM” |
| B | Swatch Internet time (000-999) |
| d | Day of the month with a leading zero (01-31) |
| D | Three characters that represents the day of the week (Mon-Sun) |
| F | The full name of the month (January-December) |
| g | The hour in 12-hour format without a leading zero (1-12) |
| G | The hour in 24-hour format without a leading zero (0-23) |
| h | The hour in 12-hour format with a leading zero (01-12) |
| H | The hour in 24-hour format with a leading zero (00-23) |
| i | The minutes with a leading zero (00-59) |
| I | “1″ if the date is in daylights savings time, otherwise “0″ |
| j | Day of the month without a leading zero (1-31) |
| l | The full name of the day (Monday-Sunday) |
| L | “1″ if the year is a leap year, otherwise “0″ |
| m | The month as a number, with a leading zero (01-12) |
| M | Three letters that represents the name of the month (Jan-Dec) |
| n | The month as a number without a leading zero (1-12) |
| O | The difference to Greenwich time (GMT) in hours |
| r | An RFC 822 formatted date (e.g. “Tue, 10 Apr 2005 18:34:07 +0300″) |
| s | The seconds with a leading zero (00-59) |
| S | The English ordinal suffix for the day of the month (st, nd, rd orth) |
| t | The number of days in the given month (28-31) |
| T | The local time zone (e.g. “GMT”) |
| U | The number of seconds since the Unix Epoch (January 1 1970 00:00:00GMT) |
| w | The day of the week as a number (0-6, 0=Sunday) |
| W | ISO-8601 week number of year, weeks starting on Monday |
| Y | The year as a 4-digit number (e.g. 2003) |
| y | The year as a 2-digit number (e.g. 03) |
| z | The day of the year as a number (0-366) |
Tags: Dates, PHP4, PHP5, Reference
Posted in PHP, Reference | No Comments »
