php id url code example
Example 1: php get id from url
$id = (int)$_GET['id'];
Example 2: get id from current url for php
$path = parse_url($url, PHP_URL_PATH);
$pathFragments = explode('/', $path);
$end = end($pathFragments);
$id = (int)$_GET['id'];
$path = parse_url($url, PHP_URL_PATH);
$pathFragments = explode('/', $path);
$end = end($pathFragments);