Created
September 19, 2013 10:18
-
-
Save rajvanshipradeep15/6621559 to your computer and use it in GitHub Desktop.
get integer from string
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
http://stackoverflow.com/questions/6278296/extract-numbers-from-a-string | |
// to get integer from string | |
preg_match_all('!\d+!', $string, $matches); | |
print_r($matches); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment