【发布时间】:2009-11-17 01:21:55
【问题描述】:
我在表单中有一个文本区域。没有提供 html 代码中的换行。 在 php 文件(forms action=phpfile.php)中,我得到 textarea 的值,如下所示:
$ad_text=wordwrap(nl2br($_POST['annonsera_text']), 47, '<br>', true);
echo $ad_text;
那么输出是:
hellohellohellohellohellohellohellohellohellohe
llohello.
hi.
hi.
hi.
/> hi.
hi.
hi.
hi.
/>
原来输入的文本区域是这样的:
hellohellohellohellohellohellohellohellohellohe
llohello.
hi.
hi.
hi.
hi.
hi.
hi.
hi.
第三个\n左右之后好像有个换行符,后面跟着一个'/>'
知道为什么吗?
谢谢
【问题讨论】: