Advanced Find / Replace

Discussion in 'PHP' started by MetaTitan, Feb 23, 2009.

  1. #1
    Could someone point me in the right direction please :)

    I'm building a tooltip for items in a game and need to reformat how some stats are displayed.

    For instance, my database gives me:
    Energy: 2

    I would like to reformat as:
    +2 Energy

    I have roughly 100 front end revisions to make on the fly as it's not possible for me to change how they're inserted into the database, but I must change how they appear to the enduser.

    Any ideas?
     
    MetaTitan, Feb 23, 2009 IP
  2. MetaTitan

    MetaTitan Peon

    Messages:
    141
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I've found my answer with preg_replace() :)
     
    MetaTitan, Feb 23, 2009 IP