Archive for March, 2009

php strpos array

Thursday, March 26th, 2009

I needed a PHP function to check whether a string contained one of the array values. As we know strpos does't accept input as an array so I had to tweak it  bit. Below is an example of what I did: function strpos_array($string, $values) { $hits = 0; ...