Re: money print out with two digits after , e.g. 49,00

From: Date: Tue, 08 May 2001 15:11:28 +0000
Subject: Re: money print out with two digits after , e.g. 49,00
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-51909@lists.php.net to get a copy of this message
At 08.05.01 16:34, you wrote:
I want to changes 49.4  --->       49,4
                            49,4 ---->     49,40
Try this
<? $totaal=49.4; $totaal=str_replace(".",",",sprintf("%2.2f",$totaal)); echo "TOTAL after =$totaal<br>"; ?> Oliver

« previous php.general (#51909) next »