I have currency input strings like these. $50 …I only need 50 $60.59 …I only need 60, need to remove $ and .59 €360 …I only need 360 €36.99 …I only need 36, need to remove € and .99 £900 …I only need 900 £90.99 …I only need 90 In other words, I need to remove all currency symbols from
Tag: truncate
How do I truncate a decimal in PHP?
I know of the PHP function floor() but that doesn’t work how I want it to in negative numbers. This is how floor works This is what I WANT Is there a PHP function that will return -1234? I know I could do this but I’m hoping for a single built-in function Answer Yes intval