The tip offered in this post is actually documented in date page of the PHP manual but it's one of those things I wasn't aware of until seeing it in an example somewhere else just before posting this … [Read more...] about Embed literal text in PHP date format strings
Information and howto articles for PHP
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.
We use Zend Lucene Search on a PHP ecommerce website and ran into some issues where records added to the search index from the website interface weren't the same as when created from the command line. … [Read more...] about Locale issues with Zend Lucene search
A little while back I posted how to set cookies with jQuery and was asked about the domain setting and how setting the domain affects sub domains. This post explains how cookies and domains work, and … [Read more...] about Cookies and domains
A PHP install on Debian 5 by default does not include the Xslt extension which means the following error will occur if trying to use the XsltProcessor class: " Fatal error: Class 'XsltProcessor' not … [Read more...] about PHP: Class XsltProcessor not found
The PHP file_put_contents() function is a useful shortcut for dumping a string into a file (compared with using fopen, fputs etc). By default it will create a new file if it does not exist, or … [Read more...] about PHP: Write and append to files with file_put_contents
PHP's filter_var function can validate if an IP address is valid and can further validate if it is an IPv4 IP, IPv6 IP, or not within the private or reserved ranges. This post shows some examples … [Read more...] about Validating an IP address with PHP’s filter_var function