title: how can I create a list of times in php?
body: <p>I have x.</p>
  
  <p>x is minutes.</p>
  
  <p>I have a string start_time like: 7:00</p>
  
  <p>And I have a string end_time like: 14:00</p>
  
  <p>how can print a list of time with increase x  minutes for each loop?</p>
  
  <p>I want print something like this:</p>
  
  <pre><code>if x = 30
  
  7:00 - 7:30
  7:30 - 8:00
  ...
  13:30 - 14:00
  </code></pre>
  
  <p>I try do it with math functions in php like this:</p>
  
  <pre><code>$time = '7:00';
  $mm = $hh = 0;
  $str = explode(":",$time);
  if(($str[1]+ $x) &gt; 60)
  {
  ...
  }
  </code></pre>
  
  <p>but it there a more simple method? can date function in php do it?</p>