hay all, hope somone can help me to find the problem,
i try to build a reppot in my site , using mysql database and php
i have an array ($row) that hold the data from mysql table and i have two columns that i need to change there format beffore making my calcuation in the reported ,
$row[‘DS’] //comes as number with 1 point (like 12.2) --> i need to change it to integer wihtout point
$row[‘TC’] // comes as number with 1 point (like 12.2) --> no need to change
and then the calcultion: $row[‘TC’]/$row[‘DS’] // when i doing the calculation im getting a vlaue with around 16 number after the points (like 12.34454354444334) --> i want to see only two number after the point
im try to do it in that way
$DSF = number_format($row[‘DS’],0);
$ConF = ($row[‘TC’] / $DSF) ;
echo $ConF
but there is a problem with that way fro example
$row[‘TC’] = 190.0
$row[‘DS’] = 59009.2 //after chainging the format it will be 59009
and then the calculation should be 59009/190 = 000.321 (somthing around this)
but instend of this i gote 3.22
in this case the values should be 0
someone can help me with this