F*U*R*B*Y* commented on a PHP Script, Live Updates for a Live event  -  Jun 09, 2010
function bbc2html($str) {
    $patterns = array( "/\[link\](.*?)\[\/link\]/", "/\[url\](.*?)\[\/url\]/", "/\[b\](.*?)\[\/b\]/", "/\[u\](.*?)\[\/u\]/", "/\[s\](.*?)\[\/s\]/", "/\[i\](.*?)\[\/i\]/", "/\[center\](.*?)\[\/center\]/", "/\[scroll\](.*?)\[\/scroll\]/"); 
    $replacements = array( "<a href=\"\\1\">\\1</a>", "<a href=\"\\1\">\\1</a>", "<strong>\\1</strong>", "<u>\\1</u>", "<s>\\1</s>", "<i>\\1</i>", "<center>\\1</center>", "<marquee behavior=\"scroll\" direction=\"left\">\\1</marquee>"); 
        $str = preg_replace($patterns,$replacements, $str);
    return stripslashes($str);
}
bbc2html($str);

k thnx

 Respond  
Are you sure you want to unfollow this person?
Are you sure you want to delete this?
Click "Unsubscribe" to stop receiving notices pertaining to this post.
Click "Subscribe" to resume notices pertaining to this post.