Mach aus 29,90 --> 29.90. In PHP brauchst Du den Punkt und nicht das Komma als Trenner bei integer und float werten. Für die Ausgabe nimmt Dir number_format() auch viel Arbeit ab.
Beispiel:
PHP-Code:$anzahl = 3;
$preis = 29.90;
$gesamt = $anzahl * $preis;
echo number_format($gesamt,2,",",".")." €";


LinkBack URL
About LinkBacks
Zitieren