quindi se non ho capito male
la funzione sarebbe
giusto?Codice PHP:function nl2p($st){
$st = preg_replace( "/\\r\\n/" , "\\n" , $st );
$st = preg_replace( "/\\n\\n[\\n]*(.*)/" , "\\n\\n$1" , $st );
$st= str_replace("\n\n","</p>
", $st);
$st= str_replace("\n", "
", $st);
return $st;
}

Rispondi quotando