[英]Show new lines and spaces?
我正在编写留言簿,我想在显示帖子时显示新的行和空格吗?
当我发布主题时,所有内容都显示在一行上。
救命!
使用nl2br() 。 基本上,它是在每个换行符前面加上<br /> 。
nl2br()
<br />
使用此功能:
http://php.net/manual/en/function.nl2br.php
nl2br()会将新行转换为<br/>标记,因此您将获得新行。
[英]Preg Match Spaces & New Lines?
[英]Removing new lines containing spaces
[英]How to remove spaces ( new lines) from string?
[英]Regex to find consecutive new lines separated by spaces
[英]How to explode a string, with spaces and new lines?
[英]Regex not matching the pattern with spaces and new lines
[英]Array to string in php replace spaces with new lines
[英]Remove new lines/spaces/tabs in HTML response
[英]Multiple blank lines with spaces, tabs and new lines to one line?
[英]Compare two strings ignoring white spaces, new lines, breaks
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.