Skip to content

Instantly share code, notes, and snippets.

@AmigoDheena
Created March 29, 2022 12:45
Show Gist options
  • Save AmigoDheena/67e8515607c620de223d59637d523096 to your computer and use it in GitHub Desktop.
Save AmigoDheena/67e8515607c620de223d59637d523096 to your computer and use it in GitHub Desktop.
Use URL as the page tile
<?php
$page_array = explode('/', $_SERVER['REQUEST_URI']) ;
$page = end($page_array);
$page = substr($page, 0, strpos($page, "."));
$page = str_replace("-", " ", $page);
echo ucwords($page);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment