I want to fetch all attributes under default attribute set with their groups in magento. I used below code for fetching the attributes but how can i split with their Groups.
$attributes = Mage::getModel('catalog/product_attribute_api')->items('4');
foreach ($attributes as $_attribute)
{
echo '<pre>' . print_r($_attribute);
}
Thanks in advance!.