Re: Global Arrays ?
| From: | Bogdan Stancescu | Date: | Thu, 20 Dec 2001 23:41:06 +0000 |
| Subject: | Re: Global Arrays ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-78367@lists.php.net to get a copy of this message | ||
Sounds quite odd - you may try an "echo(serialize($g_months))" in the
function and see what you get... It may be that the code generating the
option box has problems - this way you make sure $g_months is empty indeed.
Bogdan
Jason Rennie wrote:
> Hi all,
>
> I've got an array in the global scope called $g_months which oddly enough
> contains the names of the months.
>
> Now when I try to import this into a function as
>
> global $g_months;
>
> it doesn't work. When php prints out the array as an option box I just
> wind up with no options.
>
> Any ideas why this is the case ? Am I doing something wrong ?