- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$link = "http://itunes.apple.com/se/app/animoto-video-slideshows/id459248037?mt=8";
preg_match("/id([0-9]*)/", $link, $matches1);
var_dump($matches1);
preg_match("/id([0-9]+)/", $link, $matches2);
var_dump($matches2);