<?php
// includes/currency_helper.php

function getCurrencySymbol($code) {
    $symbols = [
        'USD' => '$',
        'EUR' => '€',
        'GBP' => '£',
        'JPY' => '¥',
        'CNY' => '¥',
        'NGN' => '₦',
        'GHS' => '₵',
        'INR' => '₹',
        'CAD' => 'C$',
        'AUD' => 'A$'
    ];
    return $symbols[$code] ?? $code;
}

function formatCurrency($amount, $symbol = '$') {
    return $symbol . number_format((float)$amount, 2);
}
?>