Quantcast
Channel: PHP Freaks: PHP Help
Viewing all articles
Browse latest Browse all 13200

testing part numbers

$
0
0
How can I test a number for digits after a decimal point?

I would like to do somthing like;

$num = 5.34
If the digits after the decimal point of $num are less than .10 then round down, else
$num++

The idea being that this could be used in a loop until either a whole number is found, or until a number is rounded down.

Viewing all articles
Browse latest Browse all 13200

Trending Articles