Menu
I’m looking for the most efficient way of searching through a string, and for each occurrence of a substring, run a function on it. Similar to the array_filter() function for arrays, except it would be on a string. I suppose I could break up the string into an array of words, but I don’t think that would be the most efficient method. Hoping somebody out there knows of a function I could use for that.
For example:
str_filter($search, $subject, $function_name);
and it would run
myFunction(&$value) { return TRUE; }