Re: formatting

From: Date: Mon, 17 Jun 2002 16:26:05 +0000
Subject: Re: formatting
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-102542@lists.php.net to get a copy of this message
printf("<td><font size=1 face=arial>£%01.2f</font></td>", $itemtotal); ----- Original Message ----- From: "Phil Reid" <phil@philip-reid.com> To: <php-general@lists.php.net> Sent: Monday, June 17, 2002 5:20 PM Subject: [PHP] formatting How do I format a string to match a currency value? For example; echo "<td><font size=1 face=arial>£$itemtotal</font></td>"; How do I output that with the format £0.00? At the moment if there is only 3 digits when the items are added up it will come out as £0.0. Thanks again Phil Reid

« previous php.general (#102542) next »