I got all the drop down attribute value in this way
<select class=" required-entry required-entry select" name="product[age]" id="age">
<?php
$attributeId = Mage::getResourceModel('eav/entity_attribute')->getIdByCode('catalog_product','age');
$attribute = Mage::getModel('catalog/resource_eav_attribute')->load($attributeId);
$attributeOptions = $attribute->getSource()->getAllOptions();
foreach($attributeOptions as $each){?>
<option value="<?php echo $each[value]?>"><?php echo $each["label"]?></option><?php
}
}?>
</select>
In Here attribute Id = age. Now i already store some value in database that should be in selected
Please Help me for this Thanks in advance
Also i used in this code
<select class=" required-entry required-entry select" name="product[age]" id="age">
<?php $productId = $this->getProduct()->getId();
$product = Mage::getModel('catalog/product')->setStoreId(Mage::app()->getStore()->getId())->load($productId);
$selectedvalue = $product->getAttributeText('age');
$atributeCode = 'age';
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product',$atributeCode);
$options = $attribute->getSource()->getAllOptions();
foreach($options as $key => $value){
if(in_array($selectedvalue,$value)){
?>
<option>
<?php echo $value['label'] ; ?>
</option><?php
continue;
}
?>
<option>
<?php echo $value['label']; ?>
</option><?php
}?>
</option>
</select>
it also display all attribute value not highlighted selected value

