First off, a web search for "global variables are evil" might prove insightful.
Apart from that, you are using the global keyword in the wrong place. Anything outside of a function or class is in global scope. Anything inside those is not.
So you have
function get_title() {
$title = 'stuff'; # function get_title scope = not in global scope
}
get_title(); # defines a variable called $title in get_title's local scope.
# still no global scope variable $title
function HTML() {
global $title; # define the global var $title (since it didn't exist yet)
echo $title; # this is ok
}
# no $title is in global scope
echo $title; # this is also ok. but $title is null.
So you can drop the function HTML() alltogether, and change get_title() to
function get_title() {
global $title;
$title = ...;
}
echo '<title>'.$title.'</title>'; # allready are in global scope here.