I have an example link here:
http://mydomain.com/myapp1/index.php/image/index/album/check+picture/id/1
Now I'm trying to retrieve the "1" at the very end of the url.
So far, I've tried the following code:
$id = $_GET['id'];
But it is not working. I was used to the url having the index.php?id=1
Syntax but I'm not entirely sure how to get this one working.
UPDATE
Before accepting an answer, I wanted to add this script I used to get the entire URL of the current page:
$protocol = strpos(strtolower($_SERVER['SERVER_PROTOCOL']),'https') === FALSE ? 'http' : 'https';
$host = $_SERVER['HTTP_HOST'];
$script = $_SERVER['SCRIPT_NAME'];
$params = $_SERVER['QUERY_STRING'];
$currentUrl = $protocol . '://' . $host . $script . '?' . $params;
echo $currentUrl;
When it echoes, it only prints out: