hay all
i have simple question about varible type in php
i have two values in my array
$row['DS'] // type :float (with one decimal like 12.2)
$row['TC'] // type :float (with one decimal like 24.2)
what im exctaly try to do in the make the above calcualtion
$row['TC'] / $row['DS'] ( $row['DS'] need to be as intenger (without point,like 12)
and the resulte should be with two decimal like (2.32)
i tried to do it in that way
////////
$DSF = number_format($row['DS'],0);
$ConF = $row['TC'] / $DSF ;
echo number_format($conF,2);
///////
but it return me a worng cllculation . for example :
($row['DS'] = 59,009.3---> (after change the format is change to 59,009
$row['TC'] = 190.0
$ConF = 190.0 / 59,009 = it sohuld be 000.223 (something around this number ) and i expect the get 0 (after i change the format using number_format($conF,2)
but instead of this the program return me the number 3.22
someone has idea how to get ride out of this ?