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 replacement
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!