Dave Carrera wrote:
Hi List,
I have worked out how to highlight all search words in a string. I hope its useful to some one. Please make it better if you can so we can all share it.
But what I want to know is how can I treat each string with this highlighting routine individually so that my output is each string highlighted where necessary like the single string code dose below.
So I turn $string into an array by $string[] for each three lines and tackle each one separately and when all search words are highlighted for that string do the next then the next and end up with 3 strings with each word in the string highlighted.
http://www.php.net/array_walk
array_walk -- Apply a user function to every member of an array
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

