Copy and pasted from the PHP manual:

"If the include occurs inside a function within the calling file, then all
of the code contained in the called file will behave as though it had been
defined inside that function. So, it will follow the variable scope of that

So in other words any script you include inside the function LoadSections()
will be local to that function.


----- Original Message -----
Sent: Thursday, November 14, 2002 1:55 PM
Subject: [PHP] http_get_var and isset() not working with script generated

> I wrote a bug report but [EMAIL PROTECTED] bogusified my report without the
> least bit of information.
> My script uses multiple includes and the file names all have the same
> syntax. So instead of writing each individual include, I created an
> array which contains all the filenames
> function LoadSections($sections)
> {
>  foreach ($sections as $key => $value)
>  {
>   include "mod.section." . $value . ".php";
>  }
> }
> instead of writing
> include file_x;
> include file_y;
> and so on
> All the files load well except that I cannot access HTTP_GET_VARS and
> the isset() function always return false (when they are inside the
> files).
> NB My includes work fine when loaded individually
> --
> PHP General Mailing List (
> To unsubscribe, visit:

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to