If I get you right you have e.g. $match_name and you want to list all names in a drop-down and make the selected one the same as $match_name????
So lets assume you have done a select and got all the user names out as a result set and put them into an array in the form $array[x][y] where x is the row number and y is the column number....... thus the value of the first column in the first row is $array[0][0] second col in first row is $array[0][1] etc....
Lets also assume that you want $array[x][0] to be shown and $array[x][1] to be the value of the selected field
<SELECT NAME="name">
<?php
for($opt=0;$opt<count($array);$opt++) {
print('<OPTION VALUE="'.$array[$opt][0].'" ');
if($array[$opt][1]==$match_name) {
print('SELECTED');
}
print(' >'.$array[$opt][1].'</OPTION>');
}
?>
</SELECT>
Dave
(also building a similar system)