I have a function in an include and i'd like to make some of the variables usable in the main page...
say i have 2 pages index.php and include.php as follows...
index.php
------------
<?
include $root."include.php";
getvar();
?>
blah blah blah
<? echo $a; ?>
-------------------------------------
include.php
--------------
<?
function getvar();
{
$a = "my global variable";
}
?>
-------------------------------------
how can i make $a a callable variable in index.php without making it a session variable???
i tried setting it as a global variable in the include file, but nogo both inside and outside of the getvar() function.
Thanks in advance for your help!