Group with PHP not in MySQL query
<p>I have table like this</p>

<pre><code>id | type 
--- ----- 
1  | fh  
--- ----- 
2  | fhs  
--- -----  
3  | so    
--- -----  
4  | sos   


while($row = mysql_fetch_array($res)){
    if($row['type'] == "fh" OR $row['type'] == "fhs"){
        $name = "Flush Head Studs";
    }else if($row['type'] == "so" OR $row['type'] == "sos"){
        $name = "Through Standoffs";
    }
    $category .= '&lt;option value="'.$row['type'].'" name="'.$row['type'].'"&gt;' . $name . '&lt;/option&gt;';
}
</code></pre>

<p>code above is displayng names twice. How can i do that names are only once in list.</p>
