Henrik Hudson wrote: > I would think you would need to define $array_test outside in a "global" > environment rather then inside the function since I think/thought it will > just stay scoped in there and that "global" was used to access variables > which weren't defined inside a functions scope and make it look outside. > > In other words > > //Define GLOBAL > $array_test = array(); > > switch(){ > BLAH > BLAH > > } > > function main() { > global $array_test; > BLAH > BLAH > > } > > function test_one(){ > global $array_test; > BLAH > BLAH > > }
Yes, the only way I could avoid errors that occurred when I tried to manipulate the array, was to add a $array_test = array(); a few lines before the switch statement. Alas, this also emptied the array each time I went from one function to another via the switch statement. I guess I am trying something that is just not possible (when I insist on using the switch statement)? -- Imar de Vries - [EMAIL PROTECTED] - ICQ 6972439 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]