Page 1 of 1
PHP Error:Invalid argument supplied for foreach()
Posted: Thu Apr 15, 2010 2:05 pm
by Suresh Chinnam
I moved my project from old server to new server.when i am trying to run my project i am not able to get data from database.
Its showing error as:PHP Warning: Invalid argument supplied for foreach()in E:\pvworkbenchdev\classes\Screen.class.php on line 340
can anyone suggest what to do to slove this issue .
Re: PHP Error:Invalid argument supplied for foreach()
Posted: Thu Apr 15, 2010 2:07 pm
by AbraCadaver
Not without code.
Re: PHP Error:Invalid argument supplied for foreach()
Posted: Thu Apr 15, 2010 2:21 pm
by Suresh Chinnam
Then where the problem and i stuck with it from last 3 days,i am helpless what to do can u briefly explain what i can do to resolve the issue
Re: PHP Error:Invalid argument supplied for foreach()
Posted: Thu Apr 15, 2010 2:29 pm
by AbraCadaver
Suresh Chinnam wrote:Then where the problem and i stuck with it from last 3 days,i am helpless what to do can u briefly explain what i can do to resolve the issue
You can only use an array or object in a foreach and you are using a variable that is not one of those. You need to find out where the variable in the foreach is being defined and that is where your problem is.