Ah, how to fix the line feed in the html tag ·-php Tutorial

Source: Internet
Author: User
For help, solve the problem of wrapping in html tags & #183; & #183; & #183; PHPcode & lt ;? Php $ html & lt; tbody & gt; & lt; table & gt; & lt; inputtype & quot; hidden & quot; name & quot; prt & quot; value & quot; 1 & quot; & gt; & lt; inpu for help. solve the problem of line breaks in html labels ···
PHP code
  

   '; $ Content = preg_replace ("xxx", "", $ html); echo $ content;?>


As in the above example, There is a line feed in the label. how can I remove the line feed through a regular expression?
I have been writing for a long time and cannot remove the line feed. Please help me ~~~~~

------ Solution --------------------
PHP code
$ Html =' '; $ Content = preg_replace ("/([^>]) [\ r \ n] +/x", "$1", $ html); echo $ content;

Related Article

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.