Forum Moderators: coopster
I get all the page output and check it wit preg_replace to bold some words . but it will bold a word if it finds it in my page html header code and that's messing up my page.
$string = get_ob_content();
$words_to_bold = array("word1","word2","word3","word4");
echo preg_replace('~('.implode('¦', $words_to_bold).')~','<b>$0</b>',$string);}
How can i tell it to skip the content between the head tags?
Thanks
[edited by: eelixduppy at 9:47 pm (utc) on Oct. 4, 2008]
[edit reason] fixed formatting [/edit]
Sorry g1smd, not trying to hijack your idea. Didnt fully read the answers before posting. My apologies :)