I want to create dropdown programmatically. The dropdown have time and at last I want in option close. Kindly check what I am doing:
<select>
<?php for($i = 0; $i < 24; $i++): ?>
<option value="<?= $i; ?>"><?= $i % 12 ? $i % 12 : 12 ?>:00 <?= $i >= 12 ? 'PM' : 'AM' ?></option>
<?php endfor ?>
</select>
This gives me the time what I want like 1:00 Am 2:00 AM
But I want at last the option "close" will show. Because office will close on sunday. I am getting the numbers programatically but at last I want user is able to select close option as well.
Any idea or suggestions would be welcome.