>>341
foreach($value as $val) {
$encode = mb_convert_encoding($val,"UTF-8","Shift_JIS");
$url_encode =urlencode($encode);
$html="http://thesaurus.weblio.jp/content/$url_encode";;
$html2=file_get_contents($html);
$utf=mb_convert_encoding($html2,"Shift_JIS","UTF-8");
$str="$utf";
$word = array();
while(1){
$kensaku2=preg_match('/title="([^"]*)" class=crosslink/', $str, $match);
if($kensaku2 == FALSE){
break;
}else {
$match_result = $match[1];
array_push($word, $match_result);}
$pos = strpos($str, $match_result);
$str = substr($str, $pos+$kensaku2);
}
$unique=array_unique($word);
$array=array_values($unique);
print_r($array);
}
じゃダメ?