Status: Success
Time (seconds): 13.5578
Financial Analysis and Plan
0) { $totalIncome += $transaction['Unnamed: 2']; } } // Calculate total expenses $totalExpenses = 0; foreach ($transactions as $transaction) { if ($transaction['Unnamed: 2'] < 0) { $totalExpenses += abs($transaction['Unnamed: 2']); } } // Calculate savings rate $netIncome = $totalIncome - $totalExpenses; $SavingsRate = ($totalIncome - $totalExpenses) / $totalIncome * 100; // Create a summary table echo "Summary
"; echo "
| Category | Amount |
|---|---|
| Total Income | $" . number_format($totalIncome, 2) . " |
| Total Expenses | $" . number_format($totalExpenses, 2) . " |
| Net Income | $" . number_format($netIncome, 2) . " |
| Savings Rate | " . number_format($SavingsRate, 2) . "% |
| Date | Description | Amount |
|---|---|---|
| " . $transaction['Unnamed: 0']->format('Y-m-d') . " | " . $transaction['Unnamed: 1'] . " | " . ($transaction['Unnamed: 2'] > 0 ? '+' : '-') . "$" . number_format(abs($transaction['Unnamed: 2']), 2) . " |
Based on your financial data, we recommend considering the following investment options:
"; echo "At Corey's Bank, we offer a range of services to help you manage your finances:
"; echo "Open a High Yield account today with us and start earning more interest on your savings!
```