Question: ```
http://localhost/mc/site-01-up/index.php?c=lorem-ipsum

$address = "http://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]";
$stack = explode('/', $_SERVER["REQUEST_URI"]);
$file = array_pop($stack);
echo $file;

```

result - `index.php?c=lorem-ipsum`

How to get just file name (`index.php`) without `$_GET` variable, using `array_pop` if possible?

Answer: 
Try this, not tested: 

```
    $file = $_SERVER["SCRIPT_NAME"];
    $parts = Explode('/', $file);
    $file = $parts[count($parts) - 1];
    echo $file;

```
If you are trying to use the GET method without variable name, another option would be using the $\_SERVER["QUERY\_STRING"]

<http://something.com/index.php?=somestring>

$\_SERVER["QUERY\_STRING"] would return "somestring"