<a href="images/gallery/943/1.jpg" class="highslide" onclick="return hs.expand(this)"><img src="images/gallery/943/1s.jpg" /></a>
robię to tak:
ale niestety zero reakcji, czy ktoś wie gdzie jest błąd?
<a href="images/gallery/943/1.jpg" class="highslide" onclick="return hs.expand(this)"><img src="images/gallery/943/1s.jpg" /></a>
$html = '<a href="images/gallery/943/1.jpg" class="highslide" onclick="return hs.expand(this)"><img src="images/gallery/943/1s.jpg" /><img src="images/gallery/943/2s.jpg" /></a>'; $dom = new DOMDocument('1.0', 'utf-8'); $dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8')); $xpath = new DOMXpath($dom); foreach ($xpath->query('//a/img') as $img) { $img->parentNode->removeChild($img); } $out = $dom->saveHTML($dom->documentElement);