RE: [PHP] Walk though array applying my highlighting routine? [SOLVED]
| From: | Dave Carrera | Date: | Wed, 05 May 2004 12:40:46 +0000 |
| Subject: | RE: [PHP] Walk though array applying my highlighting routine? [SOLVED] | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-185418@lists.php.net to get a copy of this message | ||
Thank you list for you help
-----Original Message-----
From: Burhan Khalid [mailto:phplist@meidomus.com]
Sent: 05 May 2004 11:00
To: Dave Carrera; php-general@lists.php.net
Subject: Re: [PHP] Walk though array applying my highlighting routine?
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
---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 03/05/2004
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.676 / Virus Database: 438 - Release Date: 03/05/2004