The WYSIWYG editor in the CMS I’m using encloses tables in paragraphs. <p><table>
This is causing a problem when it interfaces with another tool.
I’m trying to remove the unwanted paragraph tags on the back side. It would need to be able to handle <p><table>, <p>[whitespace]<table>, <p> <table class=‘data’>, etc…
This is what I’ve come up with so far.
$find=array(“[<p><table.*.>]”,“[</table></p>]”);
$replace=array(“<table>”,“</table>”,“<table>”,“</table>”);
preg_replace($find,$replace,$str);
Any help would be appreciated
E