Menu
I am sure there is a simple solution to this, but I have found that when I define a variable in one place that it isn’t always available within the rest of the page. For example:
[CODE]
<?php include(“includes/header.php”); //within header $myVariable is declared (by $myVariable = 2;) ?>
<html>
<head>
</head>
<body>
<p>
my variable = <?php echo $myVariable ?>
</p>
</body>
</html>
Is there a way to declare a variable inside an include and have it remembered by the rest of the page that the include is inserted into?