[Solved] Variables as www.example.com/var1/var2/ [duplicate]


<?php
$url = $_SERVER['REQUEST_URI'];
$url_splitter = explode("https://stackoverflow.com/", $url);
echo '<pre>';
print_r($url_splitter);
?>

Now you can access the variables by taking $url_splitter[0], $url_splitter[1],....

1

solved Variables as www.example.com/var1/var2/ [duplicate]