I have an array with values like "849" and "584" or "275" etc and am running a mySQL query against each of these values. It appears to execute fine but I receive no values returned. What am I doing wrong here?
$content = "";
foreach ($cookies_array as $key => $value){
$sql_select_recent_items = $db->query("SELECT id, name FROM products WHERE id=".$key." LIMIT 0,10");
$content .="".$sql_recent_activity_items["id"]." - ".$sql_recent_activity_items["name"]."<br>";
}
When I do a var_dump on the array, it shows correctly like:
array(10) { [0]=> string(3) "852" [1]=> string(3) "856" [2]=> string(3) "720" [3]=> string(3) "783" [4]=> string(3) "784" [5]=> string(3) "785" [6]=> string(3) "708" [7]=> string(3) "716" [8]=> string(3) "717" [9]=> string(3) "749" }