I agree with web sorry for not answering you previous question got lost somewhere
<?php
$r = range(1, 24);
$selected = is_null($selected) ? date('H') : $selected;
$select = "<select name=deph id=dephour>\n";
foreach ($r as $hour)
{
if(strlen($hour) < 2) {
$hour = str_pad($hour, 2, "0", STR_PAD_LEFT);
}
$select .= "<option value=\"$hour\"";
$select .= ($hour==$selected) ? ' selected="selected"' : '';
$select .= ">$hour</option>\n";
}
$select .= '</select>';
echo $select;
echo":";
$rminutes = range(1, 60);
$selected = is_null($selected) ? date('i') : $selected;
$selectminutes = "<select name=depm id=dephour>\n";
foreach ($rminutes as $minutes)
{
if(strlen($minutes) < 2) {
$minutes = str_pad($minutes, 2, "0", STR_PAD_LEFT);
}
$selectminutes .= "<option value=\"$minutes\"";
$selectminutes .= ($minutes==$selected) ? ' selected="selected"' : '';
$selectminutes .= ">$minutes</option>\n";
}
$selectminutes .= '</select>';
echo $selectminutes;
?>