Driver program to test above functions
$ arr = array ( 1 , 4 , 5 , 3 , 2 , 6 ) ; $ n = count ( $ arr ) ; if ( areConsecutive ( $ arr , $ n ) == true ) echo " ▁ Array ▁ elements ▁ are ▁ consecutive ▁ " ; else echo " ▁ Array ▁ elements ▁ are ▁ not ▁ consecutive ▁ " ; ? >