On Friday 09 August 2002 12:16, [EMAIL PROTECTED] wrote:
> 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]))
Use print_r($ret) to see why it's not working. Use array_search() or
in_array() to make it work.
--
Jason Wong -> Gremlins Associates -> www.gremlins.com.hk
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
/*
An evil mind is a great comfort.
*/
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php