Re: [PHP] Error in foreach?

2005-01-10 Thread tg-php
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

RE: [PHP] Error in foreach?

2005-01-10 Thread Jay Blanchard
[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

Re: [PHP] Error in foreach?

2005-01-10 Thread Matt M.
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 --