str_replace("/n","&nbsp;&nbsp;&nbsp;&nbsp;<br>",$yourstr)

解决方案 »

  1.   

    str_replace(" ","&nbsp;",$string);
      

  2.   

    输入新闻的时候,就在每段前,加上全角空格或者&nbsp;&nbsp;&nbsp;&nbsp;
      

  3.   

    $content=ereg_replace(13," ",$content);
      

  4.   

    $output_text=preg_replace("/(<p>|<br\s*\/?>)/i","\\1&nbsp;&nbsp;&nbsp;&nbsp;",$input_text);如果只是换段时首行缩紧,去掉其中的|<br\s*\/?>
      

  5.   

    引用$content=ereg_replace(13," ",$content);
    请问大哥这个13是什么作用呢?
      

  6.   

    OK,问题解决,多谢: lzkd(浪子快刀)