我想在我的cmd值=比较时删除这段代码,我该怎么做?如何在php中删除html标签?
这里是我的代码:
<h1 style="margin-top:24px;"><?=ucfirst($_GET['page5'])?><? if($_POST['mode']=='test' || $_GET['mode']=='test') { print " (Test Mode)"; } ?></h1>
if($_GET['cmd']=='compare' && !$_POST)
{
}
我用这个代码:
$dom = str_get_html($html);
// ...or construct dom from file/url
$dom = file_get_html($path);
// strip h1 tags (and their content)
foreach ($dom->find('h1') as $node) {
$node->outertext = '';
}
我如何删除上面的代码在CMD =由具有比较