I'm a somewhat newcomer to PHP, so ...
I am passing a variable $theState into a function, and this line:
$zz = $statesRegions[$theState]['Region'];
generates an error: Undefined index: Pennsylvania in E:\moodle\moodle\local\sssevents\classes\observer.php on line 167
I, though I do something like this:
$theState = 'Pennsylvania';
$zz = $statesRegions[$theState]['Region'];
I get the answer that I want.
This has to do with passing a variable into a function, and then using it to index an array. Can anyone shed some light on this?
Thanks.