Created
February 7, 2019 13:20
-
-
Save renalpha/e581c8504b7e9661febd60604ef552e4 to your computer and use it in GitHub Desktop.
Transform formatted price with possible currency to integer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$value = (int)preg_replace("/([^0-9\\.])/i", '', $value); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment