$txt = file_get_contents("indi/tmp.txt");
//print $txt;
$reg = "/(<(option)[^>]*>)(.*)(<\/\\2>)/";
$reg = "/(<((.*)stateProvinceDropdown(.*)|option)[^>]*>)(.*)(>|option>)/";
preg_match_all($reg,$txt,$array);
while(list($k, $v)=each($array[0])) {
preg_match("/\"(.*)\"/",$v,$array2);
preg_match("/>(.*)",$v,$array3);
if(stristr($v,"stateProvinceDropdown")) {
$nazione = substr($array2[1],22,2);
print "$nazione ----------------------------
";
} else {
$provincia = $array2[1];
$nome_provincia = $array3[1];
}
//preg_match("/\"(.*)\"/",$v,$array3);
print htmlentities( "$k | ");
print htmlentities( "$nazione | ");
print htmlentities( "$provincia | ");
print htmlentities( "$nome_provincia | ")."
";
}
?>