I have an array which looks something like this:
array(-2, -1, 0, 1, 2, 3, 4)
I would like to count the number of negative numbers only. I can't spot where it says how to do this in the manual, is there no function to do this? Do I have to create a loop to go through the array manually?
count_negative_numbers_in_arrayfunction build in. You'll have to do it yourself.