Get store id, store name, store code Magento

Get store id, store name, store code


foreach (Mage::app()->getWebsites() as $website) 
{
foreach ($website->getGroups() as $group) 
{
$stores = $group->getStores();
foreach ($stores as $store) 
{
echo $website->getName() . ' ---- ' . $store->getName() . ' ---- ' . $store->getCode() . ' ---- ' . $store->getId() . '<br/>';
}
    }
}

Labels: