I couldn't find anything regarding my issue while searching. Maybe I wasn't wording my search properly. Anyway, I the am trying to call a function from another file from inside another function, but it isn't working. It appears to be a scope issue. I have the following:
File1.php:
<?
function myCoolFunction()
{
// Some really cool stuff in here
}
Then in File2.php:
<?
require('File1.php');
// A bunch of stuff
function anotherCoolFunction()
{
// Do some stuff
myCoolFunction();
}
myCoolFunction does not exist inside of anotherCoolFunction. I can call it in File2.php but not within another function. So my question is, how can this be achieved? Is there such thing as a super global function in php?
Thanks for any help!