Tropickz Posted March 19, 2008 Share Posted March 19, 2008 Hello, I am creating a php file and it's all about done, but I am getting "Warning: Invalid argument supplied for foreach() in" error. The line is foreach($crimes as $v) { Can I try this below or am I missing something on my part. My php version is sufficent! if(is_array($crimes['$v'])) { foreach($crimes as $v) { Thanks !! Quote Link to comment Share on other sites More sharing options...
serhatcasmin Posted March 19, 2008 Share Posted March 19, 2008 As you mention yourself $crimes has to be an array. If it does not exist or not an array then you get an error. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.