<?php $id = $_SERVER['PHP_SELF']; $id = preg_match('#\d+#',$id, $m); $m = intval($m[0]); var_dump($m); ?>