How do I put a comma in a big number?

I need to turn $total, which is currently 14323 into 14,323

What is a good way to do this?

Thanks.

There is a function for that:
http://us.php.net/number_format

If you are doing this for money then there is also [fphp]money_format[/fphp], but it’s a little more complicated to use. On the plus side, it can be used to get things to line up on ledger sheets when combined with a fixed width font like Courier.