Get last order of an customer magento

magentoHere is the example code by which you can get last order details into mangento of using email id.

$_customer = Mage::getModel('customer/customer');
$_customer->loadByEmail('demo@demo.com');

$orders = Mage::getResourceModel('sales/order_collection')
->addFieldToSelect('*')
->addFieldToFilter('customer_id', $_customer->getId())
->addAttributeToSort('created_at', 'DESC')
->setPageSize(1);

<strong>ID</strong>
echo $orders->getFirstItem()->getId();