3
1
Back

New DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { $article['content'] = $matches[1]; $img = preg_replace("@height=\"\d+\"@", "", $img); $img = preg_replace("@height=\"\d+\"@", "", $img); $img = $matches[1]; $article['content'] = $this->get_img_tags($xpath, "//div[@id='comic']//img", $article); } Clean up code formatting; added a few comics; standardized appending alt/title text under images.

New Pull Request