Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
57
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.34 KB | None | 0 0
  1. $options = array("value" => array("edict", "erep"), "text" => array("Dictatorship", "Republic"));
  2.  
  3. $gov_options = '<option value="eother">Other</option>';
  4.  
  5. foreach ($options as $option) {
  6. $gov_options .= printf('<option value="%s"%s>%s</option>', $option['value'], ($option['text'] == $row['government']) ? ' SELECTED' : '', $option['text']);
  7. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement