Travis
0
Q:

br2nl

$newlineTags = array(
  '<br>',
  '<br/>',
  '<br />',
);
$html = str_replace($newlineTags, PHP_EOL, $html);
0
$html = 'this <br>is<br/>some<br />text <br    />!';
$nl = preg_replace('#<br\s*/?>#i', "\n", $html);
echo $nl;
0
$newlineTags = array(
                '<br>',
                '<br/>',
                '<br />',
            );
            $str = str_ireplace($newlineTags, PHP_EOL, $str);
0

New to Communities?

Join the community