hello,
i have a string value '1,200.00' and i would like to convert it to a double. is there a php function that can handle this?
thanks.
$str = '1,200.00'; $float = str_replace(",","",$str);
now use $float 🙂
first check out: settype function: http://php.net/settype
somthing like: settype($string, "float");
and if this is not good enugh .. check out: http://php.net/manual/en/language.types.string.php#language.types.string.conversion