vi posto tutto il codice:
Mi da sempre "Ricerca fallita!", mente l'output dovrebbe essere: "title...<span class="date">(2008)</span>"Codice PHP:
$page = '...<h1>
title
... <span class="date">(2008)</span>
</h1>
';
if (preg_match("/<h1>(.*?)<\/h1>/i", $page, $match)) {
$t = $match[1];
echo "trovato! $t";
} else {
echo "Ricerca fallita!";
}
mi sapete aiutare?