I have a function that uses lots of global vars and arrays - e.g.
$a=1; $b[0]=\'a\'; $b[1]=\'b\'; $c=\'Hello\'; function foo() { echo \"$a $b[0]
When ever you have a function, the context management in PHP 5.3 doesn't allow access to global variables without the use of the "global" keyword.
Php.net has a post about the topic here.
function foo() { global $a, $b, $c; echo "$a $b[0] $b[1] $c"; }