hello all.
i've got a little problem with a mysql query that is getting a 'quantity' field value, which is of a 'float' type ;
"select quantity from disk_usage limit 1"
while($data = mysql_fetch_array($result)) {
$QUANTITY = $data[quantity];
}
weirdly, the type of this variable is a string... the problem is that I wish to perform various operations on this value (round), and for that, I need a float.
Why is PHP automatically transform the variable type ? I already tried to bypass this by using someting like ;
$QUANTITY = round((double)$QUANTITY, 2);, but it fails.
Thanks for any help.