substr_in_array
No matter what I want to do with an array, PHP usually has a first class method that does it. I was therefore surprised that in_array() didn't handle substring matches. (I was sure there was a flag, but apparently not!) No doubt everyone has their own version of this, but here's mine so that I don't have to recreate it next time: /** * A version of in_array() that does a sub string match on… continue reading.