Find letters in paragraph via PHP

the_grinch

New Member
Let's say I have this sentence."The dog took the kid's bone."Well using PHP, can I find specific letters inside that sentence (if any at all) that I specify?So for example, I want to find the letters g, t, h, and e.Then the sentence would appear like:The do g -- t ook t h e kid's bon e.(sorry about formatting...)See how certain letters are bolded (highlight in a way). They are from the g,t,h, and e combo I wanted. Is there a way to do this in PHP?Also, I forgot to mention that once a letter is found... it cannot be bolded again. So if I was looking for a t* and the letter t appeared more than once... it would ONLY highlight ONE (the first) t... UNLESS I specify to find more than one t.
 
Back
Top