vinoindiamca Posted January 19, 2009 Share Posted January 19, 2009 Hi Please help in this I need Double value like 2000.00 $payment=1000.00; $days=2; $payment=$sesroomamt * $days; echo $payment; it gives 2000 but i need 2000.00 help in this Link to comment https://forums.phpfreaks.com/topic/141445-calculate-double-value-with-integer-gives-integer/ Share on other sites More sharing options...
Mark Baker Posted January 19, 2009 Share Posted January 19, 2009 It is giving you a double, but the echo is displaying it without decimals because they're all 0. Take a look at number_format() or money_format() for formatting a value when echoing Link to comment https://forums.phpfreaks.com/topic/141445-calculate-double-value-with-integer-gives-integer/#findComment-740378 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.