Jump to content


Photo

Problema com number_format

Php number_format float banco

  • Faça o login para participar
2 replies to this topic

#1 bobsap

bobsap

    Normal

  • Usuários
  • 82 posts
  • Sexo:Masculino
  • Localidade:marilia

Posted 23/01/2016, 01:15

Imprimo um valor float do banco usando nu,ber_format, mas as casa decimais estão zerando!

 

Valor do banco:

 

10.999,99

 

Valor após number_format:

 

10.999,00

 

Código:

<td width='70' align='right'; size='10' maxlength='10'>".number_format($MAPA['VALOR_ENTRADA'], 2, ',','.')."</td>

number_format($MAPA['VALOR_ENTRADA'], 2, ',','.')

Alguém já teve este problema?



#2 next3g

next3g

    Novato no fórum

  • Usuários
  • 1 posts
  • Sexo:Não informado

Posted 27/01/2016, 12:48

Olá .

Tenta usar ceil:  http://php.net/manua...nction.ceil.php

(ok2)



#3 zerof

zerof

    Normal

  • Usuários
  • 76 posts
  • Sexo:Masculino
  • Localidade:São Paulo
  • Interesses:GEOLOCALIZAÇÃO, APACHE, PHP, MYSQL, FOTOGRAFIA, GERENCIAMENTO DE PROJETOS

Posted 03/02/2016, 15:19

Dê uma olhada:

http://usr.ed48.com/mat/?mfc=13

 


--
zerof
ASSESSORIA & INTERDISCIPLINARIDADE
( ADVICE & INTERDISCIPLINARITY )
http://ed48.com/ - http://educar.pro.br





Veja alguns posts relacionados com: Php, number_format, float, banco

0 user(s) are reading this topic

0 membro(s), 0 visitante(s) e 0 membros anônimo(s)

IPB Skin By Virteq