Search
 
SCRIPT & CODE EXAMPLE
 

PHP

time dropdown in html

for($hours=0; $hours<24; $hours++) // the interval for hours is '1'
    for($mins=0; $mins<60; $mins+=30) // the interval for mins is '30'
        echo '<option>'.str_pad($hours,2,'0',STR_PAD_LEFT).':'
                       .str_pad($mins,2,'0',STR_PAD_LEFT).'</option>';
Comment

PREVIOUS NEXT
Code Example
Php :: active class php 
Php :: Apache/2.4.46 (Win64) OpenSSL/1.1.1j PHP/7.3.27 Server at localhost Port 80 
Php :: views_pre_view 
Php :: php login system 
Java :: minecraft death counter 
Java :: java get appdata path 
Java :: how to change font size in JLabel 
Java :: java get next enum 
Java :: java swing make window not resizable 
Java :: ansi colors 
Java :: how to get witdth of window android 
Java :: javafx dependency 
Java :: react-native force rtl on android 
Java :: starting code of java 
Java :: empty character in java 
Java :: java string to boolean 
Java :: android coding how to open map 
Java :: bukkit event list 
Java :: java get current date string 
Java :: how to stop screen rotation in android code 
Java :: print up to 2 decimal in java 
Java :: JFrame labels 
Java :: how to set event priority in spigot 
Java :: date to string java 
Java :: java calculate elapsedTime 
Java :: java double to fixed decimal 
Java :: java get random index from array 
Java :: how to set lowered bezels in jlabel 
Java :: shakescleare merchant of venice 
Java :: void get method using collections 
ADD CONTENT
Topic
Content
Source link
Name
9+7 =