Actually i have three foreach loop.I want to skip the second foreach loop when third foreach loop value($val == $test) match. This is my code.
<tbody>
<?php foreach ($tests as $test): ?>
<tr>
<td><?= $test; ?></td>
<?php foreach ($room as $key => $value): ?>
<?php foreach ($value['dates'] as $val) : ?>
<?php if ($val == $test) { ?>
<td><span class="text-danger"><?= $value['room_id'];?</span></td>
<?php } ?>
<?php endforeach; ?>
<td><span class="text-custom"><?= $value['room_id']; ?></span></td>
<?php endforeach; ?>
</tr>
<?php endforeach; ?>
</tbody>