Use below code to get all options of attribute with Id :
<?php
$attribute = Mage::getSingleton('eav/config')
->getAttribute(Mage_Catalog_Model_Product::ENTITY, 'color');
if ($attribute->usesSource()) {
$options = $attribute->getSource()->getAllOptions(false);
echo "<pre>";
print_r($options);
echo "</pre>";
}
?>
This will output/prints options Array like :
Array
(
[0] => Array
(
[value] => 20
[label] => Black
)
[1] => Array
(
[value] => 27
[label] => Blue
)
[2] => Array
(
[value] => 221
[label] => Brown
)
[3] => Array
(
[value] => 17
[label] => Charcoal
)
....
UPDATE : For key=>value
pairs, use array_column
function,
Just replace print_r($options);
TO print_r(array_column($options,
'label', 'value'));