Global function
Posted: Tue Jul 11, 2006 6:01 am
ok i am sure this is a stupid question but how do I declare a function in the global scope of things? like if i have this:
then i include that file into this file:
how do I do that?
Code: Select all
function dump($arr)
{
echo '<pre>';
print_r($arr);
echo '</pre>';
}Code: Select all
require_once 'globalfunctions.php';
class thingy
{
function thingy()
{
//i want to be able to use the dump function here
dump(array(1, 2, 3, 4, 5));
}
}