- array_map: documentation ( source)
- var_dump: documentation ( source)
- preg_match_all: documentation ( source)
- array_unique: documentation ( source)
<?php
$string = '<img src="/index.php/tools/packages/bullseye/file_display.php?htmlpage=∓fID=3200" /><img src="/index.php/tools/packages/bullseye/file_display.php?htmlpage=∓fID=300" /><img src="/index.php/tools/packages/bullseye/file_display.php?htmlpage=∓fID=300" />';
$file_ids = array();
$html = preg_match_all('~src="/index\.php/tools/packages/bullseye/file_display\.php\?htmlpage=&fID=(\d+)"~', $string, $file_ids);
$file_ids = array_unique(array_map(function($v) { return intval($v); }, (array)$file_ids[1]));
var_dump($file_ids);