PHP5.3’s ?: expression
I was digging through the PHP5.3 release info and came across a really neat little expression. It’s a simplified version of the “() ? : ;” expression, a handy little expression to use in variable assignment. The way this expression works is as follows:
Setting up the perfect CodeIgniter & TDD environment
As CodeIgniter has little built-in test support, it’s often difficult setting up a good environment to allow Test-driven Development using SimpleTest and the CodeIgniter framework. I’ve been using Ruby on Rails a lot recently, and I was inspired by the fantastic built in integration with unit, functional and integration tests, so when I returned to CodeIgniter, I delved into the deep dark world of setting up the perfect CodeIgniter and TDD environmen
Searching CodeIgniter Apps with Sphinx
Due to popular demand, I’m writing this tutorial as a companion to my previous post, Searching SQL with Sphinx. In this tutorial I’m going to show you how to use the excellent Sphinx search engine to provide full-text search functionality to database-powered CodeIgniter ap
Screen Scraping with PHP
There are quite a few good screen scraping libraries available for PHP apps so that you can pull and parse a page, search for specific elements, enter data into and post forms et cetera, but if you just need to do a bit of screen-scraping work and you don’t need an entire library (or don’t want the additional overhead of another file to load), PHP has a few handy tricks up its sleeve to make this really easy.