<?php $string='This is a space after a <br> break. This is 2 spaces after a <br> break. This is a tab after a <br> break. This is a newline after a <br> break'; var_export(str_replace(['<br> ','<br /> '],['<br>','<br />'],$string)); // if you KNOW there is only one space echo "\n\n"; var_export(preg_replace('~<br(?: /)?>\K\s+~i','',$string)); // if you want to remove all spaces, tabs, newlines
You have javascript disabled. You will not be able to edit any code.