php get id from url

Solutions on MaxInterview for php get id from url by the best coders in the world

showing results for - "php get id from url"
Emanuele
01 Jul 2017
1$id = (int)$_GET['id'];
Emanuele
26 Nov 2016
1$path = parse_url($url, PHP_URL_PATH);
2$pathFragments = explode('/', $path);
3$end = end($pathFragments);
4