Inside HTML code, parsed as php, in a select, I've been using the below. It's a bit 
longer than your plan to use arrays, but it works fine.

<select name="country">
<option value="">-- Select a country --</option>
<option value="USA" <?php if ($country == 'USA') { echo " selected"; } ?>>United 
States</option>
<option value="AFG" <?php if ($country == 'AFG') { echo " selected"; } 
?>>Afghanistan</option>

and so forth....

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to