se ke esto se puede hacer con highlight_string(); pero no me funciona. yo hice algo asi
Código PHP:
<?
$conexion = mysql_connect("localhost","root","pass");
mysql_select_db("base",$conexion);
//------------------------------------------------
function bbcodes($comment) {
$comment = ereg_replace('\[code\](.*)\[/code\]',"<table width=95% cellspacing=0 cellpadding=0 border=0 bgcolor=e2e2e2 align=center><tr><td>".highlight_string("<? echo date(\"d/m/Y\"); ?>")."</td></tr></table>",$comment);
$comment = nl2br($comment);
return $comment;
} // de la function.
//------------------------------------------------
if (isset($go)) {
$comentario = bbcodes($_POST[comentario]);
mysql_query("INSERT INTO comentarios (id_coment, nombre, ip, comentario) values ('1', 'Volrath', '155.155.155.55', '$comentario')");
header("Location: comentarios.php");
} // del if (go)
?>
<html>
<head>
<title>Agregar Comentarios</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
BODY { color: #777777; font-family: Verdana; font-size: 10px; }
TD { color: #777777; font-family: Verdana; font-size: 10px; }
.titulo { font-weight: bold; font-size: 12px; color: #FFFFFF }
</style>
</head>
<body>
<form action="<?=$PHP_SELF?>" method="post" name="form">
<table width="450" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="20" bgcolor="#000099"><div align="center"><span class="titulo">Agregar Comentarios</span></div></td>
</tr>
<tr>
<td><div align="center">
<textarea name="comentario" cols="70" rows="5"></textarea>
</div></td>
</tr>
<tr>
<td bgcolor="#CCCCCC"><div align="center"><input type="submit" name="go" value="Enviar!!"></div></td>
</tr>
</table></form>
</body>
</html>

espero que me puedan ayudar con esto.
salu2x