Esto es lo que tengo:
$ssql = "SELECT respuesta FROM foro where id='{$_REQUEST['id]}' order by fecha DESC";
$rs = mysql_query($ssql);
while ($fila = mysql_fetch_object($rs)){
$string = $fila->respuesta;
echo bbcode($string);
}
function bbcode($string){
$string = nl2br(htmlspecialchars($string));
$patterns = array(
'`\[quote\=(.*?)\](.*?)\[\/quote\](.*)?`is'
);
$replaces = array(
'<div align="left" style="margin:-2px 1px;"><strong><font face="sans-serif, Helvetica" size="2">\1 escribió:</font></strong></div><div align="left" style="margin:0px 0px;padding:5px;background-color:#FFFFFF;border:1px dotted #CCCCCC;width:80%"><em>\2</em></div><font face="verdana, arial, sans-serif, Helvetica" size="2">\3</font>'
);
$string = preg_replace($patterns, $replaces , $string);
return $string;
}
Espero sus ayudas.
Saludos!!!
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)
![sonriente](http://static.forosdelweb.com/fdwtheme/images/smilies/smile.png)