- var_dump: documentation ( source)
- preg_match: documentation ( source)
<?php
$urlKey = 'ftrcvgbhnjk-2000-4628-20.html';
if ($result = preg_match('/-\d+-(\d+)\.html.*$/', $key, $matches)) {
$result = $matches[1];
}
echo $result;
var_dump($matches);
echo $oldUrlKey;