I am try to run a foreach else in the 2nd div col… the first div col runs great but on the 2nd div i get
Warning: Invalid argument supplied for foreach()
[php]
$stmt = $connection->prepare(“SELECT * FROM games JOIN mods USING(GameID)”);
$stmt->execute();
$result = $stmt->get_result();
while ($row = mysqli_fetch_assoc($result)) {
$GameID = $row['GameID'];
$GameName = $row['GameName'];
$GameCover = $row['GameCover'];
$ModName = $row['ModName'];
$ModCover = $row['ModCover'];
echo "
$GameName
echo "<div class='row'>";
foreach($GalleryImage as $item){
if(array_key_exists($item)) {
echo "<h1>ModName</h1>";
echo "<img src='$item'>";
} else {
echo "NO MODS";
}
}
echo "</div>";
}
[/php]