Formatting Dates with PHP
PHP has a really useful date() function for formatting dates from timestamps. When used in conjunction with strtotime() you can do some really quick and easy manipulation and formatting of dates.
PHP is a powerful open source server-sided scripting language that can be used on a wide variety of operating systems and webservers, including Apache on UNIX and IIS on Windows.
PHP contains numerous extensions which enable you to dynamically create images and flash files, parse xml, connect to remote servers using pop, imap, ftp, http and raw sockets, natively access many database servers including PostgreSql, MySQL and Microsoft SQL Server, compress and decompress files, lookup domain names and and much more.
PHP has an excellent manual and online documentation which covers every function for every extension available.
PHP has a really useful date() function for formatting dates from timestamps. When used in conjunction with strtotime() you can do some really quick and easy manipulation and formatting of dates.
The strtotime() function in PHP allows you to convert English text date time strings into UNIX timestamps. It is useful for converting database datetime strings into UNIX timestamps and also creating dates into the future or past based on the current time or relative to a date and time in the future or the past. This post looks at some examples of doing this.
The PHP function array_unique() allows you to create a new array which contains only the unique values from the original array. This post looks at some examples of using the array_unique function.
phpMyAdmin is a tool written in PHP intended to handle the administration of MySQL using a web browser and is one of the most active projects on Sourceforge.
A little while back I needed to split a large Apache log file (3.5GB) up into smaller pieces and wanted to break it up into several files, with one for each day of the month. I initially tried using "grep" on the command line but this proved to be too slow, and I needed to run it once for each day and month so it was going to take 92 times to run, extracting just one day at a time over the course of three months. I ended up writing a quick little PHP script which was able to split the 3.5GB file into 92 files, one for each day of each month in under 4 minutes.
When compiling PHP with Sablotron there are errors which prevent PHP from compiling. This article covers what you need to do to enable PHP to compile correctly with Sabloton.