At the beginning of the concept is only a little vague, not too concerned about, the results of a search only found that this thing is too interesting, not only has an interesting story, but also has a lot of doorways, but also brought up some of
Here is my solution to the problem, and finally I understand it, it's a sewer that almost capsized
1. You must know that the line break in TextArea is \ n (personal detection found that pressing ENTER is \ n, as if it were \ r \ n under Linux)
2.
Today, I encountered a textarea line feed problem in the project, which was not solved after debugging for half a day. You need to convert the carriage return text in textarea into a br and store it in the database. The following is my solution to
Summary of alternative line break methods in PHP
PHP replaces the line break method summary, PHP has three ways to solve.1. Use Str_replace to replace line breaks
$str =str_replace (Array ("\ r \ n", "\ r", "\ n"), "", $str);
2. Use regular
Today, I encountered a textarea line feed problem in the project, which was not solved after debugging for half a day. You need to convert the line breaks in textarea into and save them to the database.
The following is my solution to this
The following is my solution to this problem. At last, I fully understood it. It was a real risk of turning around the ship.
1.You must know that the linefeed in textarea is \ n (I found that the Enter key is \ n, as if it is \ r \ n in
Here is my solution to the problem, and finally I understand it completely, it's almost capsized in the gutter.
1. You must know that the line break in textarea is \ nthe (personal detection found to hit Enter is \ n, as if under Linux is \ r \ n)
2.
PHP Regular Expression full manual, regular expression full manual
Full Manual of regular expressions for PHP
Objective
Regular expressions are cumbersome, but powerful, learned applications will give you an absolute sense of accomplishment in
how to get rid of manual line breaks in Word documents
(1) Click Replace on the Edit menu;
(2) On the Replace dialog box, click the Advanced button;
(3) Move the cursor to the Find what box, and then click the Special Characters button, and then
From:http://www.cnblogs.com/siqi/archive/2012/10/12/2720713.html // php there are three ways to resolve//1, use Str_replace to replace line breaks $str = str_replace (array ("\ r \ n", "\ r", "\ n"), "", $str ); // $str = preg_replace ('/
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.