/ Published in: PHP
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getDayOptions( $selected ) { $options = ''; for( $x = 1; $x < 32; $x++ ) { $options .= '<option value="' . $x . '"'; if( $x == $selected ) { $options .= ' selected="selected"'; } $options .= '>' . $x . '</option>'; } return $options; }