Magento - get Attribute Options of the dropdown type attribute
$attribute_code = "color";
$attribute_details = Mage::getSingleton("eav/config")->getAttribute("catalog_product", $attribute_code);
$options = $attribute_details->getSource()->getAllOptions(false);
Foreach($options as $option){
echo $option["value"];
echo $option["label"];
}
The above code does not work if the resource_model is empty. The following snippet does the job:
/** @var $attribute Mage_Eav_Model_Entity_Attribute */
$attribute =Mage::getModel('eav/entity_attribute')->loadByCode(Mage_Catalog_Model_Product::ENTITY,'YOUR_ATTRIBUTE_CODE');
$valuesCollection =Mage::getResourceModel('eav/entity_attribute_option_collection')->setAttributeFilter($attribute->getId())->setStoreFilter(0,false);