$total = $total + $lineprice;
$total = number_format($total,2);

this is the code i use for getting a decimal, but when the $total is over 1000 it's shown as 1,000 and the total becomes 1,00
any solution for this?

here is an example might make it more clear:
http://img690.imageshack.us/img690/8484/voorbeelde.jpg

Member Avatar for diafol

Place your decimal character and your thousand separator character (if appropriate):

$total = number_format($total,2,".",",");
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.