I am trying to display something on web pages that show this in the url: "sub" for example: ...com/videos/category/1/sub536. It was suggested I try some code like this:

$page = basename($_SERVER['PHP_SELF']); 
if ($page=="content.php") {
echo Hello World; 
} elseif ($page=="content.php") {
Some Other code... 
}

but I don't know where to place the url in that code to make it purposeful.
And I'm not sure that I need if/else, just would like if: /videos/category/1/sub__ then show echo

The code above just gives a 404 error.

Any help/suggestions with display something on web pages that show this in the url: "sub__" is appreciated

    Write a Reply...