sabyasachi Posted May 25, 2007 Share Posted May 25, 2007 Hello, Is there anyway function available in PHP or MySQL which will convert a formatted string like '1,999,999' to '1999999'? I mean which is works opposite of what FORMAT() function does, which is available in MySQL. Link to comment https://forums.phpfreaks.com/topic/52932-solved-formatted-string-to-number/ Share on other sites More sharing options...
jitesh Posted May 25, 2007 Share Posted May 25, 2007 http://php.net/number_format Or <?php $number = str_replace(",","","1,999,999"); echo $number; ?> Link to comment https://forums.phpfreaks.com/topic/52932-solved-formatted-string-to-number/#findComment-261386 Share on other sites More sharing options...
sabyasachi Posted May 25, 2007 Author Share Posted May 25, 2007 Thanks! Link to comment https://forums.phpfreaks.com/topic/52932-solved-formatted-string-to-number/#findComment-261389 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.