在下拉列表中只显示一次相同的项目?

I have the following drop down list, that has a common item 'a'. This item is shown two times in output, but it want to have it only once. Can anybody help me?

<select name="">
<option value="a">a</option>

<option value="a">a</option>
<option value="b">b</option>

 </select>

My code is

 <select name="brand" id="brand" class="txtfld" >
      <option value="">Select</option>
      <?php
           $country_sql="SELECT DISTINCT(brand) FROM customer where status='A' and brand<>''";
           $result_country=executequery($country_sql);

           while($country_array=ms_stripslashes(mysql_fetch_array($result_country)))
           {
                $sel_con=($country_array['brand']==$_REQUEST['brand'])? " selected='selected'" : " ";

                $brand=$country_array['brand'];
                $brand2=explode('|',$brand);
                if(count($brand2)<2)
                {
                     ?><option value="<?=$brand;?>" ><?=$brand;?></option><?php
                }
                else
                {
                     for($i=0;$i<count($brand2);$i++)
                     {
                          ?><option value="<?=$brand2[$i];?>" ><?=$brand2[$i];?></option><?php
                     }
                }
           }
      ?>
 </select>

You can use array_unique() which will keep only unique values of your array :

$brand2 = explode('|',$brand);
$brand2 = array_unique($brand2);

EDIT

Try :

$new_array = array();
while($country_array=ms_stripslashes(mysql_fetch_array($result_country)))
       {
           $brand=$country_array['brand'];
           $brand2=explode('|',$brand);
           $NewArray = array_unique (array_merge ($NewArray, $brand2));
       }

Now you have all unique value in array, loop through to show the list.

NOTE: It might be a overhead if you have big data.