[PHP-DB] figures question

2003-09-27 Thread JeRRy
Hi, I have in my database a total value which looks like this. 0.0 If the figure is more than 9.9 it goes to 10.0 and so on.. The first 2 digits after the . is cents and the following is part of a cent. So it appears in the database for example like 7.51234 .. But I want to

Re: [PHP-DB] figures question

2003-09-27 Thread Joe Nilson Zegarra Galvez
I think that you want to round the number, and yes, you can do it, How?, well, by example //Your Number from the DB $number=10.259; //Apply the round function to show only two decimals $new_number=round($number,2); //The result 10.26 echo $new_number; Regards Nilson El sb, 27 de 09 de