Not a lot of people knows that PHP supports SSH. I use it to execute remote commands, auto configure of…
Regular expressions are an easy way to match or replace pieces of your content, but can be tricky if you…
November 29th, 2011
Documentation: PCRE – Perl-compatible regular expressions
1 Comment, PHP, by Joakim Ling.The PCRE library is a set of functions that implement regular expression pattern matching using the same syntax and semantics…
One of the most common used IDE for PHP developers is Zend Studio for Eclipse. Great for lazy programmers as…
October 13th, 2011
PHP 5.3 complaining about insecure authentication with MySQL 4.1+
No Comments, MySQL, PHP, by Joakim Ling.A lot of you have recently upgraded to PHP5.3, and one of the new things is the MySQL connection. If…
Ensure a class has only one instance and provide a global point of access to it. That’s called a singleton…
A while ago I had a lot of background colors stored in a database. Rather then manually pick a text…
A while a go I spent a few minutes trying to figure out the best way to get all categories…
March 17th, 2011
Get all files recursive with RecursiveIteratorIterator
No Comments, PHP, by Joakim Ling.There is a lot of ways to do this, but using the PHP5 built in SPL RecursiveIteratorIterator makes it simple…
It’s important to tell your browser what kind of information you are going to display, here are a few examples