php: check if an array has duplicates

前端 未结 15 2374
情深已故
情深已故 2020-11-27 04:07

I\'m sure this is an extremely obvious question, and that there\'s a function that does exactly this, but I can\'t seem to find it. In PHP, I\'d like to know if my array has

15条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 04:42

    Php has an function to count the occurrences in the array http://www.php.net/manual/en/function.array-count-values.php

提交回复
热议问题