echo $newnumber;
returns the number as "8.5E-6", which is perfectly fine and shows that $newnumberholds a value. Also echo gettype($newnumber); also returns "double" so everything seems perfect. But whenever I try to print the input as
echo number_format($newnumber);
it just prints "0" on the screen. Also, if I try to use that $newnumber variable on curl, I get error on the web site I'm trying to call APIs and it says "value can not be 0", so it seems like the value for that variable also passes as 0 on API request.
When I try to use number_format on the first variable, before multiplication, it returns the value without any problem, so the problem is not on the number_format function as well.
At this point I'm stuck and don't know how to solve this, any idea?
0 comments:
Post a Comment
Thanks