// Criado por Alexandre HENRIQUE //
// 02-01-2007 //

function fmt($vl) {
    return str_replace(",", ".", number_format($vl, '.'));
} 


// exemplo
$a = 12000;
$b = fmt($a);
echo $b;   // a variavel ser� impressa no formato 12.000