Skip to content

Instantly share code, notes, and snippets.

@MarkyC
Last active December 11, 2015 14:49
Show Gist options
  • Select an option

  • Save MarkyC/4616877 to your computer and use it in GitHub Desktop.

Select an option

Save MarkyC/4616877 to your computer and use it in GitHub Desktop.
<?php
while($row = mysql_fetch_row($result) {
$row_start_time = $row[0];
$row_end_time = $row[1];
// check if row_start_time <= start_time < row_end_time
// or row_start_time < end_time <= row_end_time
if ((($start_time >= $row_start_time) && ($start_time < $row_end_time)) ||
(($end_time > $row_start_time) && ($end_time <= $row_end_time)))
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment