need some simple php help

Discussion in 'PHP' started by slaydragon, Apr 17, 2008.

  1. #1
    i got this - a string
    i want to display only
    i want to eliminate the bbcode in the string, how should i do this?
     
    slaydragon, Apr 17, 2008 IP
  2. commandos

    commandos Notable Member

    Messages:
    3,648
    Likes Received:
    329
    Best Answers:
    0
    Trophy Points:
    280
  3. hogan_h

    hogan_h Peon

    Messages:
    199
    Likes Received:
    30
    Best Answers:
    0
    Trophy Points:
    0
    #3
    
    $str = '[\CODE\][\B\][\SIZE=2\]For those of you who had watch Proposal Daisakusen drama, you will be really excited to see this![/size][/b]';
    
    $result = preg_replace('/\[.*?\]/', "", $str);
    
    echo $result;
    
    PHP:
     
    hogan_h, Apr 17, 2008 IP
    slaydragon likes this.