I have an array with values that change from time to time. It will usually look like this:
Array ( [0] => 0 [1] => 0 [2] => 9876 [3] => 0 [4] => 0 [5] => 0 [6] => 0 [7] => 0 [8] => 0 [9] => 0 [10] => 0 [11] => 0 )
All of the Values will be 0 except for one (index location will change).
If more than one value is greater than 0, I need to execute a specific command.
Else, if only one value is greater than 0, I need to take that value and pass it to a specific command.
Try this code.