Jump to content

[SOLVED] Invalid argument supplied for foreach();


uramagget

Recommended Posts

				foreach ($where_array as $key => $value) {
				if ($row[$table."_".$key]!=$value) {
					$included=false;
				}
			}

 

Basically, my problem is that is shows a warning about an invalid argument supplied. I have no problem dealing with warnings, but since this will be a public script, well.. yes.. I require assistance, please.

It's telling you that the variable $where_array is not an array. Where is this being set?

put

<?php
echo '<pre>' . print_r($where_array,true) . '</pre>';
?>

Just before the foreach to see what's in the variable.

 

Ken

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.