Is there a straightforward way of determining the number of decimal places in a(n) integer/double value in PHP? (that is, without using explode)
explode
Less code:
$str = "1.1234567"; echo strpos(strrev($str), ".");