Ok So I have an PHP array of data like the following 

```
0
0
0
0
0
0
500 // Get index of this value which is 6
11000
100
110
221
1245
2141// Get index of this value which is 12
0
0
0
0
0

```

Is there a PHP function that would grab the **first Non-Zero Value index** and the **last Non-Zero value index**? Or a very beautiful way to do it?

I know I can do this with a few `IF` statements, but it will become very messy.