будет считать что $sel[01] до $sel[10] = "selected"; for ($i=1; $i<10; $i++) { print "<option $sel[".sprintf("%02d", $i)."]>"; }