Advertisement
Guest User

Untitled

a guest
Aug 27th, 2011
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.16 KB | None | 0 0
  1. <?php
  2. $url = "http://mydomain.tld/item/1234567";
  3. if(preg_match_all('/([\d]+)/', $url, $found) > 0) {
  4.     echo $found[0][0];
  5. } else {
  6.     echo "not found";
  7. }
  8. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement