[ale] PHP rounding in an imagestring

William Bagwell rb211 at tds.net
Sun Dec 28 16:56:39 EST 2014


On Sunday 28 December 2014, Phil Turmel wrote:
> So, wrap your expression with the number_format() function to limit the
> decimal places.  For two decimal places, like this:
>
> imagestring($im, 3, $left_margin, 18,
> number_format($datediff/(60*60*24), 2), $black);
>
> Enjoy!

That works! Thank you, now I can keep my shorter less 'stolen' code.
-- 
William



More information about the Ale mailing list