RE: [PHP] marking words bold

2005-05-11 Thread Murray @ PlanetThoughtful
> Include a space in your str_replace statement. > > For instance > > $t = str_replace(" $word ", " $word ", $text); > > That should prevent the problem your having and ensure only individual > words > are bolded. Not the best solution if Merlin's code needs to account for the possibility of ta

Re: [PHP] marking words bold

2005-05-11 Thread tg-php
uot;, " $word ", $text); That should prevent the problem your having and ensure only individual words are bolded. http://www.thelonecoder.com [EMAIL PROTECTED] 562.924.4454 (office) 562.924.4075 (fax) continuing the struggle against bad code */ ?> > From: Merlin <[EMAIL PR

Re: [PHP] marking words bold

2005-05-11 Thread Stephen Johnson
e) 562.924.4075 (fax) continuing the struggle against bad code */ ?> > From: Merlin <[EMAIL PROTECTED]> > Date: Wed, 11 May 2005 17:34:56 +0200 > To: > Subject: [PHP] marking words bold > > Hi there, > > I am trying to mark words inside a sentence bold. Problem is, i

Re: [PHP] marking words bold

2005-05-11 Thread Marek Kilimajer
Merlin wrote: Hi there, I am trying to mark words inside a sentence bold. Problem is, if there is an overlap it does not work anymore. I am using this code: $t = str_replace($word, "$word", $text); For eample: Mark those words bold: adventure in singapore Text: My adventure flying to singapore T

RE: [PHP] marking words bold

2005-05-11 Thread Murray @ PlanetThoughtful
> I am trying to mark words inside a sentence bold. Problem is, if there is > an > overlap it does not work anymore. > I am using this code: $t = str_replace($word, "$word", $text); > > For eample: > Mark those words bold: adventure in singapore > Text: My adventure flying to singapore > > The

Re: [PHP] marking words bold

2005-05-11 Thread Philip Hallstrom
Hi there, I am trying to mark words inside a sentence bold. Problem is, if there is an overlap it does not work anymore. I am using this code: $t = str_replace($word, "$word", $text); For eample: Mark those words bold: adventure in singapore Text: My adventure flying to singapore The problem lay

[PHP] marking words bold

2005-05-11 Thread Merlin
Hi there, I am trying to mark words inside a sentence bold. Problem is, if there is an overlap it does not work anymore. I am using this code: $t = str_replace($word, "$word", $text); For eample: Mark those words bold: adventure in singapore Text: My adventure flying to singapore The problem lay