Problem with selection

From: Date: Fri, 09 Aug 2002 04:16:10 +0000
Subject: Problem with selection
Groups: php.general 
Request: Send a blank email to php-general+get-111765@lists.php.net to get a copy of this message
Could somebody look at this and tell me way it is not selecting the option fields in the $mins variable. I have looking at this all day and can not figure out what is wrong with it. <?php $mins="3,4,6,23,59"; $ret=array_reverse(explode(',',$mins)); $td = "<td valign=top><select name=\"mins[]\" id=\"mins\" size=\"12\" multiple>"; echo "<TABLE border=0><tr>"; echo $td; for($i=0; $i<60; $i++) { if($i<=6) { echo "<option value=\"$i\""; if(isset($ret[$i])) echo ' selected'; echo ">$i</option>"; }else{ echo "<option value=\"$i\">$i"; if(($i%11)==0) echo "</select></td> \n\n $td"; }} echo "</td></tr></table></td>"; ?> -- Best regards, rdkurth mailto:rdkurth@starband.net

« previous php.general (#111765) next »