What’s the best way to get the fractional part of a float in PHP? June 11, 2023 by Tarik $x = $x - floor($x)