Sounds like $_GET isn't populated or has been over-written. Try doing the
classic print_r on $_GET to see what it contains before you do the foreach.
If you are using a form (rather than an a_href link) to pass the GET data and
you're using all checkboxes or something else that returns nothing
[snip]
I have encountered a very strange error on one of our customers sites.
Their script returns the following error:
Warning:Invalid argument supplied for foreach
This is in response to the following line:
foreach ($_GET as $key = $value)
All I am trying to do is parse the querystring!
Any
This is in response to the following line:
foreach ($_GET as $key = $value)
is $_GET an array?
when in doubt, print it out
try:
print_r($_GET)
or even check
is_array($_GET)
might be an earlier version of php
http://us2.php.net/manual/en/reserved.variables.php#reserved.variables.get
--
3 matches
Mail list logo