kalster Posted June 11, 2015 Share Posted June 11, 2015 Is there a way to remove the white space seen between <br > or other html tags using preg_replace or something? Link to comment https://forums.phpfreaks.com/topic/296748-remove-white-space-html-tag/ Share on other sites More sharing options...
requinix Posted June 11, 2015 Share Posted June 11, 2015 Is it as simple (in your case) as saying "remove all the whitespace between a > and Link to comment https://forums.phpfreaks.com/topic/296748-remove-white-space-html-tag/#findComment-1513652 Share on other sites More sharing options...
kalster Posted June 11, 2015 Author Share Posted June 11, 2015 No. Between < and >. After searching for a few hours I just found a solution to this problem. preg_replace('/br\s\s+/', 'br ', $text); Link to comment https://forums.phpfreaks.com/topic/296748-remove-white-space-html-tag/#findComment-1513653 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.