Blog

PHP Array Flip

Over the past few months I've been working a lot with PHP and some of my work has been heavily reliant on searching for values in long arrays. PHP has a nice function for doing just this (in_array) and naturally I assumed this would be the best way of doing it. However, after finding the program quite sluggish, I set out to improve matters and the following is just a very simple trick which I found made quite a difference...