1. De esta forma sería normal, o sea, $string = "[ b ]texto en negritras[ /b ]";
Código PHP:
# Negritas : Formato [ b ] texto [ /b ]
$bbcode = str_replace("[b]","<strong>",$string);
$bbcode = str_replace("[/b]","</strong>",$bbcode);
Código PHP:
$string = "[ b ][ i ][ u ]Texto Formateado[ /u ][ /i ][ /b ]";
![Pensando](http://static.forosdelweb.com/fdwtheme/images/smilies/scratchchin.gif)