function codes($text) { $text = htmlspecialchars($text); $text = str_replace(" ","  ",$text); $text = str_replace("\r\n ","\r\n ",$text); $text = str_replace("[CODE]\r\n","
",$text); $text = str_replace("\r\n[/CODE]\r\n","
",$text); $text = str_replace("\r\n[/CODE]","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("[UL]","",$text); $text = str_replace("[/UL]","",$text); $text = str_replace("[li]","
  • ",$text); $text = str_replace("[/li]","
  • ",$text); return nl2br($text); }