php find out if array contains values of over 0?

后端 未结 1 1328
长情又很酷
长情又很酷 2020-12-21 17:00

Without looping through each value in an array, is there any shortcut to checking whether it contains values over 0?

Eg

array(3,0,0) would be TR

相关标签:
1条回答
  • 2020-12-21 17:22
    if (max(array(3,0,0)) > 0) echo 'greater than 0';
    
    0 讨论(0)
提交回复
热议问题