Re: [PHP] Outputting a 2 digit number 10

2001-01-29 Thread Brian White
I normally solve this problem by doing a " 10" test, on the assumption it is quicker. Something like for ($i=00;$i$daysinmonth;$i++) { $str_i= (string) $i; if ( $i 10 ) { $str_i = "0$str_i"; } if ($i == $day) { echo("option SELECTED

[PHP] Outputting a 2 digit number 10

2001-01-25 Thread Jamie
I need to enable a user to insert an 'NEWS' item into a mySQL table one of the definable limits for the user is to be the date that the news is to be displayed. Currently the collum is in a 'date' format and should be stored in a MMDD - being Australian we are used to the exact reverse of

Re: [PHP] Outputting a 2 digit number 10

2001-01-25 Thread Pavel Jartsev
Jamie wrote: ... ? echo"select name=\"form_date_day\""; $day = (date ("d")); $daysinmonth = (date("t")); for ($i=00;$i$daysinmonth;$i++){ if ($i == $day) { echo("option SELECTED value=\"$i\"$i/option\n"); } else {