/i", "\r\n",$str);"."/> /i", "\r\n",$str);".">
Home >Backend Development >PHP Problem >How to replace br tag in php
How to replace the br tag in php: First create a PHP sample file; then replace the br tag with "\r\n" through the regular method, and the statement is "preg_replace("/
/i", "\r\n",$str);". \s*\>
Recommended: "PHP Video Tutorial"
PHP Regular Replacement"br /> ;" Tag
regular replacementdf250b2156c434f3390392d09b1c9563 is "\r\n"
$str = "1234567<br />1234567<br />1234567"; echo preg_replace("/<br\s*\/?>/i","\r\n",$str);
The above is the detailed content of How to replace br tag in php. For more information, please follow other related articles on the PHP Chinese website!