If I have an indexed PHP array:
$array = array(2, 12, 23, 34, 36, 36, 36, 56);
And I have a variable:
$number = 30;
How do I calculate the number of "array positions" that are higher than $number
?
For example, the function should return 5
, because there are 5 numbers (34, 36, 36, 36 and 56) that are higher than 30.
Edit: I've already tried different methods of counting the array values, but I have no idea how to count the positions. It has me stumped.