<?php
function formatcurrency($floatcurr, $curr = "USD"){
	$currencies['IDR'] = array(2,',','.');			//	Indonesia, Rupiah
	$currencies['USD'] = array(2,'.',',');			//	US Dollar
	
	return number_format($floatcurr,$currencies[$curr][0],$currencies[$curr][1],$currencies[$curr][2]);
}
?>