php - Extract a Flickr photo ID from URL
I need to extract a piece of a URL in PHP. From the URL
http://www.flickr.com/photos/[email protected]/7885410582 I need only the
$string2 = 'http://www.flickr.com/photos/[email protected]/7885410582'; preg_match_all('~s/ (.*?) /~i',$string2,$matches, PREG_PATTERN_ORDER); echo $matches . '<br />';
Can anyone look at it and correct it for me? Thanks in advance.