I'm trying to return a global variable in my PHP code and I cant seem to figure out why I cant return variables from a function no matter what I try. What am I doing wrong here, go easy I'm a newbie at this.
<?php
$Page = $LoadPageContent = "";
function Loadfunction(){
$Page = "Home";
$LoadPageContent = "../content/" . $Page . ".inc"
// Tried global with no result
// global $Page = "Home";
// global $LoadPageContent = "../content/" . $Page . ".inc";
// Tried return with no result
// return $Page = "Home";
// return $LoadPageContent = "../content/" . $Page . ".inc";
}
Loadfunction();
echo "Page: $Page<br>LoadPageContent: $LoadPageContent<br>";
exit;
?>