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 !! Link to comment https://forums.phpfreaks.com/topic/96862-php-error/ 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. Link to comment https://forums.phpfreaks.com/topic/96862-php-error/#findComment-495705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.