Try this
Retrieve product attribute value based on the attribute code
<?php
$attributeCode = "size";
$attribute = Mage::getModel('eav/entity_attribute')->loadByCode('catalog_product', $attributeCode);
$options = Mage::getModel('eav/entity_attribute_source_table')
->setAttribute($attribute)
->getAllOptions(false);
foreach ($options as $option) {
echo $option['label']." => ".$option['value']."<br>";
}
?>
Retrieve product attribute value based on the attribute id
<?php
$attributeId = 198;
$attribute = Mage::getModel('eav/entity_attribute')->load($attributeId);
$options = Mage::getModel('eav/entity_attribute_source_table')
->setAttribute($attribute)
->getAllOptions(false);
foreach ($options as $option) {
echo $option['label']." => ".$option['value']."<br>";
}
?>