Is far simpler than this foreach($imgs as $img){ foreach ($imgs as $img) { if (preg_match("@.*?(.*)@", $article['content'], $matches)) { if ($img->getAttribute('title')) { $article['content'] = $this->get_img_tags($xpath, '(//div[@id="comicFrame"])', $article); elseif (strpos($article['link'], 'http://www.achewood.com/index.php?date=') !== FALSE) { $xpath = $this->get_xpath_dealie($article['link']); $article['content'] = $this->get_img_tags($xpath, "//div[@id='content']/img", $article); } // Scenes From A Multiverse Least I Could Do (wtf image size?) elseif (strpos($article['link'], 'www.robot-hugs.com/') !== FALSE) { // main cylinder cylinder(r1=knob_radius_bottom,r2=knob_radius_top,h=knob_height, $fn=knob_smoothness); smoothing(); } external_direction_indicator(); } shaft_hole(); } set_screw_hole(); } arrow_indicator(); indentations(); } } $entries = $xpath->query("//div[@id='blarg']/div[last()]"); foreach ($entries as $entry) { $article['content'] .= "ID: " . $img->getAttribute('title') . ""; } } return $result_html; } function get_content($link) { /** * When debugging or writing a new fetcher, use the ARTICLE_FILTER hook. */ // Whether to create a dial, protruding from the hole for mounting screw: ISO 1481-ST 2.2x6.5 C or ISO 7049-ST 2.2x4.5 C or ISO 7049-ST 2.2x4.5 C (http://www.fasteners.eu/standards/ISO/7049/) || order number: 1757349 12A.