something like this should do foreach ($reserved_words as $key => $value) { $reserved_words_bold[$key] = '<b>'.$value.'</b>'; } $string = str_replace($reserved_words, $reserved_words_bold,$string);
olinux --- Gregor J <[EMAIL PROTECTED]> wrote: > Same as with <b>".$reserved_words."</b>, i get Array > :) > > > "Chaillan Nicolas" <[EMAIL PROTECTED]> wrote in message > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > > What about a > > str_replace($reserved_words, > "<b>$reserved_words</b>",$string); > > > > Tell me. > > > > > > -- > > Merci de nous avoir choisi. - Thanks you for your > choice. > > Nicos - CHAILLAN Nicolas > > [EMAIL PROTECTED] > > [EMAIL PROTECTED] > > www.GroupAKT.com - Hébergement Group. > > www.WorldAKT.com - Hébergement de sites Internet > > "Gregor Jak¹A" <[EMAIL PROTECTED]> a écrit > dans le message de news: > > [EMAIL PROTECTED] > > > Hello, i have array $reserved_words which i want > to replace with bold .. > > > but when i tried to do > str_replace($reserved_words, > > > "<b>".$reserved_words."</b>", $string) it showed > Array instead of > > > <b>word</b> > > > if i simply do str_replace($reserved_words, > $reserved_words, $string) > > then > > > it shows the words not Array but not in bold ;) > > > I know i could use 2 arrays one with bold words > one without or i could > use > > > foreach but i want a simpler solution :)... Any > suggestions ? > > > > > > > > > thx in advance ! > > > > > > > > > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > __________________________________________________ Do You Yahoo!? Yahoo! Finance - Get real-time stock quotes http://finance.yahoo.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php