global variables
Posted: Mon Jul 03, 2006 5:40 pm
Hello, I want to use a global variable instead of passing things back and forth but just declaring it seems to kill my whole show.
Take away the word global and it works up to a point... the point being where I want to access my global array.
Why is this happening to me?
Any help would be really brilliant.
Take away the word global and it works up to a point... the point being where I want to access my global array.
Why is this happening to me?
Any help would be really brilliant.
Code: Select all
global $allPages = array();
$p_count = 0;
function loadFiles($fn){
for($x = 0; $x < count($fn); $x++){
$doc = domxml_new_doc("1.0");
$doc = domxml_open_file($fn[$x]);
getTitles($doc);
}
doHead("Bulletin");
outputNews($allPages);
doFoot();
}