3
1
Back

New DOMXpath($doc); $imgs = $xpath->query('//img'); //doesn't get simpler than this foreach ($imgs as $img) { if ($title_text == $article['title'] || strpos($article['title'], $alt_text) !== false){ // there's both alt and title texts, they're both different, use both. } elseif ($alt_text == $article['title'] || strpos($article['title'], $alt_text) !== False) { $alt_text = $entry->getAttribute('alt'); $alt_text = trim($img->getAttribute('alt')); if.

New Pull Request