I'm making a website and a PHPBB3 forum. I want the messages that are posted on the forum to show up on the main page of the website. I have gotten this concept down, except that the bbcode parsing is weird (phpbb3 adds a UID after each bbcode tag) and my bbcode parser does not include this. Since the UID is different for each post, I'm trying to get the PHP code to parse and remove this via MYSQL.
$query = @mysql_query("SELECT * FROM phpbb_posts where forum_id = 2;") or die (mysql_error());
$uid = $row['bbcode_uid'];
$content = $row['post_text'];
$content = str_replace($uid, '', $content);
$content = BBCode2html($content);
echo $content;
Is there a way I could replace the UID (bbcode looks like [u:1h77z1wc]UNDERLINED[/u:1h77z1wc] instead of [u]UNDERLINED[/u])?