Best way...

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bob Bedford

    #1

    Best way...

    I read records on a DB and concat the content to a string to write to the
    browser.

    I'd like to add a new feature.
    If the content contains some word (prefilled list), then I must apply some
    formatting (<b> tag)

    My question is:
    What is the better and faster way to do so ?
    Should I fill a array and try with "in_array" function ?

    It's there a better way ?


  • Geoff Berrow

    #2
    Re: Best way...

    I noticed that Message-ID: <420b58e3$0$340 7$5402220f@news .sunrise.ch>
    from Bob Bedford contained the following:
    [color=blue]
    >I'd like to add a new feature.
    >If the content contains some word (prefilled list), then I must apply some
    >formatting (<b> tag)
    >
    >My question is:
    >What is the better and faster way to do so ?
    >Should I fill a array and try with "in_array" function ?
    >
    >It's there a better way ?[/color]

    str_replace() will accept arrays.

    --
    Geoff Berrow (put thecat out to email)
    It's only Usenet, no one dies.
    My opinions, not the committee's, mine.
    Simple RFDs http://www.ckdog.co.uk/rfdmaker/

    Comment

    Working...