Questa funzione prende in input il codice html come stringa e restituisce il contenuto di un tag specificato come $item:
function regExpParse($str,$item)
{
$str = preg_replace("/\\s+/"," ",$str);
$str = trim($str);
preg_match_all("/<".$item.">.*?<\/".$item.">/",$str,$rest);
$items = $rest;
return $items;
}
Ultimi commenti