标签: php arrays arabic
我正在使用阿拉伯语in_array函数... in_array ('من', $words)给出了$ words真正包含من的地方。
in_array
in_array ('من', $words)
من
但是in_array('من', $stopWords)给出了错误,尽管它包含了单词من...
in_array('من', $stopWords)
print_r($stopWords);
得到:
数组([0] =>من)
和print_r($words);
print_r($words);
可能是什么问题?
答案 0 :(得分:0)
您应该使用unicode。如果您将阿拉伯字母转换为unicode。你可以检查数组。你没有任何问题。