Ver originalfunction bbcode($str){ $simple_search = array( '/\[b\](.*?)\[\/b\]/is' ); $simple_replace = array( "<b>$2</b>" ); $str = preg_replace($simple_search, $simple_replace, $str); return $str;}