Drivers code
$ arr = array ( 1 , 1 , 1 , 1 , 1 , 1 ) ; $ n = sizeof ( $ arr ) / sizeof ( $ arr [ 0 ] ) ; $ m = 1 ; echo countTriplets ( $ arr , $ n , $ m ) ; #This  Code is Contributed by ajit NEW_LINE ? >