Re: [PHP] Is It Possible to Tell PHP To Output x Decimal Places Per Float?

2003-06-09 Thread Jaap van Ganswijk
At 2003-06-09 18:22 -0400, Dan Anderson wrote: >Is it possible to tell PHP when converting a number to a string (i.e. in >an echo or print command) to use x decimal places? > >Specifically, if I > > echo '$' . $some_price; >?> > >And some_price is $1.50, it outputs: > >$1.5 This should work: pr

RE: [PHP] Is It Possible to Tell PHP To Output x Decimal Places Per Float?

2003-06-09 Thread John W. Holmes
> Is it possible to tell PHP when converting a number to a string (i.e. in > an echo or print command) to use x decimal places? Yes, it is. > Specifically, if I > >echo '$' . $some_price; > ?> > > And some_price is $1.50, it outputs: > > $1.5 > > Thanks in advance, You're welcome. ---

[PHP] Is It Possible to Tell PHP To Output x Decimal Places Per Float?

2003-06-09 Thread Dan Anderson
Is it possible to tell PHP when converting a number to a string (i.e. in an echo or print command) to use x decimal places? Specifically, if I And some_price is $1.50, it outputs: $1.5 Thanks in advance, Dan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://