mongodb - How to make it decimal (1.25, 1.65 etc) (php) -
i'm using mongodb database. , i've made record "1.65" "1.25" "1.95" etc.
but defines them string.
when record them $a = (int) $value
drops after '.' , record "1" "1" "1"...
how can transform decimal values?
i need sum values , should transform them decimal this.
when cast value integer no decimal number, decimal numbers of type double. cast double should work.
$a = (double) $value;
Comments
Post a Comment