title: Time Interval of Dates in Array on a loop
body: <p>I have an array of datetime queried from a database. I was wondering how to get the time intervals of each dates on a loop in php</p>
  
  <p>Example</p>
  
  <pre><code>Array('2014-11-03 13:00:00','2014-11-03 14:00:00','2014-11-03 16:30:00')
  </code></pre>
  
  <p>Should output</p>
  
  <pre><code>1:00
  2:30
  </code></pre>