0
我正在使用array_push
来添加到一个数组,其中卡的数量是多少。计算单词在数组中显示的次数?
$array = array();
foreach($aiarray as $card) {
$cardss = card($card);
array_push($array, $cardss);
}
asort($array);
print_r($array);
这给了我我需要的,但现在我该如何搜索数组和说;
伪
if (*array contains > 2 of the same word) {
find out what word;
does the array contain more than one?;
}
完美的作品,谢谢。 – dan