[英]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.