PHP ver gevorderde |
|
Dit is zeker waar je naar toe wilt?
<?php
$sString = htmlentities('<p>test</p><table class="test" id="haha"><tr><td>test</td></tr></table>');
echo preg_replace('/(<table(?:.*?)>(?:.*?)<\/table>)/ie', 'html_entity_decode(\'\\1\', ENT_QUOTES)', $sString);
?>
<?php $sString = htmlentities('<p>test</p><table class="test" id="haha"><tr><td>test</td></tr></table>'); echo preg_replace('/(<table(?:.*?)>(?:.*?)<\/table>)/ie', 'html_entity_decode(\'\\ 1\ ', ENT_QUOTES)', $sString); ?>
|