Magento get all the attribute values you have in the store. Get all the colors and sizes values in Magento. Change the attribute name to whatever you want values for, in the below script.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
require_once('app/Mage.php');
umask(0);
Mage::app('admin');
//set_time_limit(0);
$attribute = Mage::getModel('eav/config')->getAttribute('catalog_product', 'color');
$colors = array();
foreach ($attribute->getSource()->getAllOptions(true) as $option) {
        $colors[] = $option['label'];
}
sort($colors);
foreach($colors as $lbl) {
    echo "<span style='background-color:lightgrey'>".$lbl . "</span>";
        echo "<br>";
}

Replace color with any attribute you want to get values for. Above script also sorts the result set in alphabetic order to make it easy to view all values. If you don’t want to sort the values, just comment out the line which sorts it.