Cast string with coma to float with dot

Posted by hsz on Stack Overflow See other posts from Stack Overflow or by hsz
Published on 2010-06-08T11:11:13Z Indexed on 2010/06/08 11:22 UTC
Read the original article Hit count: 261

Filed under:
|
|

Hello !

When I try to cast

$value = floatval('14,5833');

to a float type I expect a value with dot like 14.5833 but it returns me 14,5833.

How should I do this ?

I wouldn't like to use any string replace functions.

© Stack Overflow or respective owner

Related posts about php

Related posts about casting