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