Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- // closing php tag is omitted to avoid "headers already sent" error.
- $title = basename($_SERVER['SCRIPT_FILENAME'], '.php');
- $title = ucfirst($title);
- $title = str_replace('_', ' ', $title);
- // do a case insensitive comparison of $title
- //to convert a string to uppercase, use strtoupper()
- if (strtolower($title) == 'index')
- { $title = 'home'; }
- $title = ucwords($title);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement