I am fetching data from MySQL using PHP. I know that most values stored in the database are float. Sometimes, the database outputs values like
3.9999E-5 and sometimes like
0.00104961904762 (14 digits).
How can I truncate the value to 8 digits only. I am currently using:
<? echo sprintf("%.8f",$get_results['Price']);?>