$selected = array();
$selected[$priority] = 'selected';
$pstr .= 'option value="000" '.$selected['000'].'High'."\n";
$pstr .= 'option value="050" '.$selected['050'].'Medium'."\n";
$pstr .= 'option value="100" '.$selected['100'].'Low'."\n";
Is one way of doing that sort of thing, the example
Javascript has this very neat control structure that makes it easy to
iterate over the properties of an object. It would be nice to see something
similiar in PHP. I often use Objects as a way of "packing" data in a more
orderly fashion, and sometimes I need to do stuff to all the properties of
an
2 matches
Mail list logo