Posted by Marcin Dobrucki on 08/07/06 10:35
Ian Davies wrote:
> Hello
> Im using the following loop to populate a list box but I dont want th
> current selected value (from database) to show in the list
> The one I want to omitt is in the variable
>
> $row['bbannerorgfont']
>
> I wish to some how include this in the below loop to the effect of
>
> echo from 0 to 6 except for $row['bbannerorgfont']
>
> VB has select...case... etc. Is there something similar with PHP?
create an array which contains the needed values*, then:
foreach ($array as $foo) {
echo '<option value="$foo">$foo</option>';
}
* or have a default array and remove the unecessary ones.
[Back to original message]
|