Oh no! Where's the JavaScript?
Your Web browser does not have JavaScript enabled or does not support JavaScript. Please enable JavaScript on your Web browser to properly view this Web site, or upgrade to a Web browser that does support JavaScript.

parse_ubb()

Quote

parseubb ( string $text [, string $selected] )

This function will parse the bbcodes in the given string $text. To only parse sertain bbcodes use the $selected string to seperate those bbcodes you want do be pased with a |.

[intro]BBCodes was invented for forums to remove the need of use of HTML. BBcodes are fare more secure as you have control over what types of codes your users are allow to insert into your site. Pure HTML code may be used to harm your site, BBCodes gives you the control.[/intro]

Usage

Here we will parse tow stings containing bbcodes:
Code
<?php
 // Example 1
 echo parseubb("[b]This text is bold[b]");
 
 // Example 2
 echo parseubb("[i]This text is italic[i]");
 
 // Example 3
 echo parseubb("[u]This text is underlined[u]");
 ?>


Code

 $text = "[b][i][u]Some text[/u][i][b]";
 echo parseubb ($text, "b|i")

Parameters

$text
The string which contains the text to be parsed

$selected
Use this to only parse given bbcodes (separate each bbcode with a | ) , rest will not be touched