Jump to content

[SOLVED] Drop Down


Daney11

Recommended Posts

Hey guys.

 

Im using

 

<select class="forminput" name="result_hours"><?php for ($i=0; $i<=24; $i++) { echo "<option value=\"$i\""; if ($i==$sel_hours) echo " selected"; echo ">$i</option>"; } ?></select>

It returns the correct values

1

2

3

4

5 etc

 

But on the single digits i want it to return

 

01

02

03

04

05 etc

 

how do i go about doing this?

 

cheers.

Link to comment
https://forums.phpfreaks.com/topic/90071-solved-drop-down/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.