Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $url = "http://mydomain.tld/item/1234567";
- if(preg_match_all('/([\d]+)/', $url, $found) > 0) {
- echo $found[0][0];
- } else {
- echo "not found";
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement