PHP How to remove carriage return line break

Source: Internet
Author: User
How PHP removes carriage return line breaks
It is known that there are several ways to use the carriage return line, but all the line breaks are cleared, and every line I want to keep a line break how to deal with it? (That is, to filter multiple line breaks together)

1. Use Str_replace to replace line breaks
$str = Str_replace (Array ("/r/n", "/R", "/n"), "", $str);

2. Use regular replacement
$str = preg_replace ('//s*/', ' ', $str);

3. Use PHP-defined variables (recommended)
$str = Str_replace (Php_eol, ", $STR);
------Solution--------------------
$s =<<< TXT
First for everyone to send pictures of no eyebrows, no modified eyebrows, so that the whole person looks very lack of spirit, short eyebrows and eye makeup is not commensurate with, visible eyebrow makeup in the entire makeup is really important.


To introduce you to the use of eyebrow and thrush tools: Slightly hard eyebrow pencil, eyebrow knife, brush, flat head brush
Use the eyebrow brush to clean up the upper and lower sides of the eyebrows, so that the main line of the eyebrows is clearer.




Then use eyebrow pencil to determine the eyebrow shape, using the same hair color similar to the eyebrow, the eyebrow shape to draft.

After the eyebrow shape is painted, use the eyebrow pencil to fill the box, follow the direction of the eyebrows to apply, let the eyebrows color.
TXT;
First for everyone to send pictures of no eyebrows, no modified eyebrows, so that the whole person looks very lack of spirit, short eyebrows and eye makeup is not commensurate with, visible eyebrow makeup in the entire makeup is really important.
To introduce you to the use of eyebrow and thrush tools: Slightly hard eyebrow pencil, eyebrow knife, brush, flat head brush
Use the eyebrow brush to clean up the upper and lower sides of the eyebrows, so that the main line of the eyebrows is clearer.
Then use eyebrow pencil to determine the eyebrow shape, using the same hair color similar to the eyebrow, the eyebrow shape to draft.
After the eyebrow shape is painted, use the eyebrow pencil to fill the box, follow the direction of the eyebrows to apply, let the eyebrows color.
  • Contact Us

    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.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.