Search
Generic filters
Exact matches only

Divide by zero errors

28th May 2014

Php - Maths

php codehaven

always do a pre-check to see if the variable contains only a zero, then either make 2 decimal places, (as this may prevent it fitting into the field space given, or round the number after.
This will make it two decimal places

Was this code snippet helpful?

Comment on this Code Snippet?