title: How to check if numbers are in correct sequence?
body: <p>I have a two dimensional array that contain range of numbers that have to be validated using following rules, range should start from 0 and follow in arithmetic progression.</p>
  
  <p>For example:</p>
  
  <pre><code>$array = array();
  $array[] = array(0);//VALID
  $array[] = array(0,1,2,3,4,5);//VALID
  $array[] = array("0","1");//VALID
  $array[] = array(0,1,3,4,5,6);//WRONG
  $array[] = array(1,2,3,4,5);//WRONG
  $array[] = array(0,0,1,2,3,4);//WRONG
  </code></pre>
  
  <p>what is most efficient way to do that in php?</p>
  
  <p><strong>UPDATE</strong>
  I forgot to add that numbers can be represented as string</p>