I Really Help About Crating Feature Values

hi coders i really help with this i cand do it since 3 days…,



i have this xml sample



SeriLENOVO E431Ä°ÅŸletim SistemiWindows 8 ProÄ°ÅŸlemci Tipi3. Nesil Intel Core i5Ä°ÅŸlemcii5-3230M






i am try creating features thats ok but select box text values problem.



i am getting old feature values with this


foreach ($xmlD->FEATURESas $detail) {
$ozellik = $detail->FEATURE;
$deger = $detail->VALUE;
.... creating if not have features ok



$varData = db_get_array("SELECT pfvd.variant_id, pfvd.variant FROM ?:product_feature_variant_descriptions AS pfvd
LEFT JOIN ?:product_feature_variants AS pfv ON pfv.variant_id = pfvd.variant_id
WHERE pfv.feature_id = ?i AND lang_code = ?s", $feature_id, CART_LANGUAGE);

}

if ($varData)
{


foreach ($varData as $variants)
{
if ($deger == $variants['variant'])
{
$feature_data["variants"][] = Array("variant" => (string) $variants['variant']);

}
else
{

$variantos1["variants"] = Array("variant" => (string) $variants['variant']);
$variantos2["variants"] = Array("variant" => (string) $deger);
$feature_data["variants"][] = array_merge($variantos1["variants"], $variantos2["variants"]);


}

}
}

else
{$feature_data["variants"][] = Array("variant" => (string) $deger); }





}








i cant get old feature values data and add if not new value. this way just adding new walue to feature values

please please help