Could anyone give me an explanation (and maybe an example) on how to strip the trailing zeros from a number using PHP.
For example:
"Lat":"37.422005000000000000000000000000","Lon":"-122.84095000000000000000000000000"
Would be turned in to:
"Lat":"37.422005","Lon":"-122.84095"
I am trying to strip the zeros to make it more readable. I tried using str_replace() but this replaced the zeros inside the number too.