I have some break times available in my module. In one for loop i need to remove break times. I have three break times 11:30 am to 11:45 am and lunch break 01:30 pm to 02:30 pm and tea break 04:30 pm to 04:45 pm

$start = new DateTime("09:30 am");
$end = new DateTime("06:30 pm");
$current = clone $start;
while ($current <= $end) {
    echo $current->format("h:i a"), "\n";
    $current->modify("+15 minutes");


Please help me to solve this problem

Below is my code to insert times.

I need only working times.any body help me

  <?php for ($i = 0; $i < $con_count; $i++) { 

   $ab=mysql_query("select * from  tb1_consellor_add where consellors_id='$con_id'")or die(mysql_error());

    <div id="fragment-<?php echo $i; ?>">
<h3> <span class="label label-default">Counselor :<?php echo $conname; ?></span></h3>

static $ii=0;
static $iii=1;
$a=mysql_query("SELECT c.father_name as father_name,c.application_no as application_no FROM contact c, tb1_consellor_add t where t.consellors_id='$con_id' and c.status='0' and c.con_status='1' ORDER BY c.id ASC LIMIT $ii,$concount ") or die(mysql_error());  ?>

<table class="table table-bordered">
              <th>Form Number</th>
<?php while($rowa=mysql_fetch_array($a)){
/*SELECT productCode,
FROM products
WHERE buyPrice BETWEEN 90 AND 100*/


              <td><?php echo $iii; ?></td>
              <td><?php echo $name; ?></td>
              <td><?php echo $application_no; ?></td>
              <td><?php echo "H-m-am/pm"; ?></td></tr>


$iii++;  }
     </div>  <?php  $ii=$ii+$concount; 
                    }  ?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.