Want to make a pulldown for hours and I want it to be on the hour now (it is now 22:40 so the pulldown should be on 22).
Here is the code:
<?php
$hour_now= date(G);
$minute_now=date(i);
?>
<form action="index.php" method="post" id="schedule_form">
<p>
<label>Hour</label>
<select name="send_hour">
<?php
for($i = 0; $i < 24; $i++){
echo '<option value="' . $i .'"'. $select. '>'.$i.'</option>';
if ($si !== $hour_now)
{
$select = "";
}else{
$select = "selected";
}
}
echo '</select>';
?>
Why isn't the pulldown on 22?
Any help is appreciatedl.
Greets,
Ivan.