Re: Better way (if...elseif...else)
| From: | Stephan Ahonen | Date: | Sat, 31 Mar 2001 00:56:26 +0000 |
| Subject: | Re: Better way (if...elseif...else) | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46410@lists.php.net to get a copy of this message | ||
> $p_arr=array("000","050","100");
> $fc_arr=array("high","med","low");
> $ptext_arr("High","Medium","Low");
> for($x=0;$x<count($p_arr);$x++)
> { $pstr.="<option value=\"$p_arr[$x]\" ";
> if($priority==$p_arr[$x])
> {
> $pstr.="selected";
> $fcol=$fc_arr[$x];
> }
> $pstr.=">$ptext_arr[$x]\n";
> }
Even better! This looks like to winning entry for our mini-programming
contest. =)
Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single "s" to reply by email