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. Quote 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; ?> Quote 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! Quote 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
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.