I have two arrays:
$armortype = array(5,8);
and
$slotarray = array(1,2,3,5,6,7,8,9,10,11,11,12,16);
How do I combine these two in one foreach loop? Here's the code at the moment:
foreach($slotarray as $slot)
{
foreach($armortype as $armor)
$itempack = mysql_query("SELECT * FROM db WHERE ItemLevel BETWEEN $formlevel1 AND $formlevel2 AND InventoryType =$slot AND Quality<5 AND AllowableClass in ('$formclass', '-1','2047','32767') AND Material=$armor ORDER BY RAND() LIMIT 1");
}
}
My $armor value doesn't come out right.