I´m trying to include mi own functions in joomla code to set the header and footer of the home page of my site, As I can see, including php files works fine, but functions can not acces vars outside them.
For example:
function test () {
echo 'ok';
}
works without problems, but:
$test = 'ok';
function test () {
global $test;
echo $test;
}
does not work, so, when I call a file wich contains the functions, most of them require global variables located outside them, therefor they dont`t work as in the example I typed.
Anyone can help? Thanks in advance