Your foreach is the problem. You’re iterating once for each offering, yet you’re evaluating ALL offering values in the array each time. So your PHP is dutifully printing all available offerings * the number of offerings. I’d say go without the foreach() and see what happens.
EDIT 1
Also please note, you’re casting strings to arrays. You’re trying to look up values in an array based on an invalid key. $offerings[“hot”] – $offerings[“kids”] don’t exist, as far as PHP is concerned. $offerings[0] – $offerings[4] DO exist.
EDIT 2
Okay, you want the following in place of your foreach():
if(in_array("hot", $offerings)){
// print hot results
}
if(in_array("chill", $offerings)){
//print chill results
}
etc.
EDIT 3
Or, if I think about it further, you could stick with the foreach() in the following manner:
foreach($offerings as $offering){
switch($offering){
case "hot":
//print hot stuff
break;
case "chill":
//print chill stuff
break;
}
}
EDIT 4
If you were dealing with a larger data set, I would probably go with the switch() version, as the in_array() calls scan the whole array each time, which could get expensive, while the foreach() will simply iterate through the array and move the array pointer with each iteration. Your call, but I’m thinking that would be the way to go in order to future-proof and performance-proof. (The performance hit on a 5 value array for in_array() is likely minuscule, but these things add up.)