> I thought the above would work but it returns the following error(s):
>
> ...  value passed to reset is not an array or object ...
> ... value passed to each is not an array or object ...
>
> It seems that HTTP_POST_VARS does not like being called from inside
> functions, as the above will work if not inside the function,  I thought
> that HTTP_POST_VARS was in the global scope (as of php 4.0.3 track-vars
> is always on) , so it should have no problem being called from anywhere?
>
> Does anyone know what gives?

It is a normal global variable.  Like all other global variables you need
to declare the fact that you want the global variable inside a function.
Simply put: global $HTTP_POST_VARS; at the top of your function and it
will work just fine.

Read the section on variable scope in the PHP documentation.

-Rasmus


-- 
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]

Reply via email to