$content =$_POST['content'];

echo str_replace("\n", "<br />", $content);

写入数据库效果