get all order details magento

In this article you can get all order details once time. Run the file anf fetch all order details like order id, first name, last name, price, status etc.
In this code you get data in array formate after using foreach loop print details. 

here is full code....

<?php
require_once ("app/Mage.php");
ini_set("error_reporting",E_ALL);
ini_set("display_errors",true);
umask(0);
Mage::app('admin');

$i = 0;
$orders = Mage::getModel('sales/order')->getCollection();
//get data from each order
foreach($orders as $order)
{
$orderData[$i] = array('order id'=>
$order->getIncrementId(),
'Price'=>
number_format($order->getGrandTotal(),2),
'First Name'=>
$order->getBillingAddress()->getFirstname(),
'Last Name'=>
$order->getBillingAddress()->getLastname(),
'Status'=>
$order->getStatusLabel()
);
$i++;
}
foreach($orderData as $orderD)
{
foreach($orderD as $key => $value)
{
echo $key . " = " . $value . "<br>";
}
echo "------------------------------<br>";
}

?>

Labels: