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 .
PHP Error:Invalid argument supplied for foreach()
Moderator: General Moderators
-
Suresh Chinnam
- Forum Newbie
- Posts: 3
- Joined: Wed Apr 14, 2010 4:31 pm
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: PHP Error:Invalid argument supplied for foreach()
Not without code.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.
-
Suresh Chinnam
- Forum Newbie
- Posts: 3
- Joined: Wed Apr 14, 2010 4:31 pm
Re: PHP Error:Invalid argument supplied for foreach()
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
- AbraCadaver
- DevNet Master
- Posts: 2572
- Joined: Mon Feb 24, 2003 10:12 am
- Location: The Republic of Texas
- Contact:
Re: PHP Error:Invalid argument supplied for foreach()
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.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
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.