Rate this script:  I Love it  /   I Hate it

Generate a dropdown with days of the month


Code


<select name="start_day">
<?php
global $LOC;
$current_time_day = $LOC->decode_date('%d', $LOC->now);

for ($i = 1; $i <= 31; $i++) {
   echo "<option value='$i'";
if ($i == $current_time_day) { echo " selected='selected'"; }
   echo ">$i</option>
"
;
} ?>
</select>
 

 

 
Generate a dropdown with days of the month scripts | Generate a dropdown with days of the month snippet | Generate a dropdown with days of the month example | Generate a dropdown with days of the month tutorial | Generate a dropdown with days of the month code