Que hago mal? me dice que tengo un fallo en el foreach... No hay manera no me sale

Me ayudais por favor? Muchisimas gracias por todo !
if ($array_consulta['PER_interprete'])
{
$array_consulta['PER_interprete'] = strtoupper(trim(stripslashes($array_consulta['PER_interprete'])));
if (!eregi("^[0-9A-Za-z*%ªº ]*$",$array_consulta['PER_interprete']))
{
$array_consulta['PER_interprete']="*";
}
}
//Construimos la senctencia SQL de busqueda
$local_query = "SELECT * FROM $nomtabla WHERE";
foreach($array_consulta as $clave => $valor)
{
if (strstr ($clave,"PER_"))
{
$local_query .=" AND ".$clave." LIKE '".$valor."'";
}
}
echo "$local_query";
}