Getting All Products on a Page in Magento

Here is the code to get all the products:
$allproducts = Mage::getModel(‘catalog/product’)->getCollection()

->addAttributeToSelect(‘*’);

foreach ($allproducts as $product) {
echo $product->getName() . ”
“;
}