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

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -