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