Q:

What is the best way to check if an EAV attribute exists in Magento?

Who would know how to check if an attribute exists in magento before adding options to it?
Thanks a lot!

A:

You should be able to do something like:
$entity = 'catalog_product';
$code = 'status';
$attr = Mage::getResourceModel('catalog/eav_attribute')
    ->loadByCode($entity,$code);

if ($attr->getId()) {
    // atttribute exists
}

