Hi Pamela,

Try this:

$value = 200;

$value_ok = sprintf("%.2f", $value);

print "R\$ $value_ok"; # gives R$ 200.00

Resposta a sua mensagem de quinta-feira, 4 de outubro de 2001:

CPA> I am passing a variable that needs to be in currency format (with two
CPA> decimal places).  It passes as a whole number with no decimal.  How can I
CPA> format this? 

CPA> ---------------------------------------------------------------------
CPA> To unsubscribe, e-mail: [EMAIL PROTECTED]
CPA> For additional commands, e-mail: [EMAIL PROTECTED]




Sem mais,

Luiz Fernando B. Ribeiro
Engenho Solu��es para a Internet
[EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to