php - ParseFloat a string and retain zeroes in decimal part -
i have problem, found javascript parsefloat, thats not solution need.
i have f.e. string 48.453150 e
, , need float number that, when use (float)
, return 48.45315
, need retain zeroes @ end of decimal part. dont know, how many digits in decimal part, can various.
is there way, parse float string , retain zeroes?
when parse number float, it's not string, concept of trailing digits doesn't make sense.
when want display number, use number_format($number, 5)
convert string 5 digits after decimal point. include trailing zeroes.
Comments
Post a Comment