I have this bit of code within a while loop.
$hometeamwin=(lose,win) so with that bit of code above it is printing “winlose”
If there’s occurrences of ‘lose’ within $hometeamwin I’d like it to print “lose” (but only once!)
if there’s no occurrences of ‘lose’ print ‘win’ (but only once!)
If I understand your problem (I’m not positive I do) you want to look at all of the bets and if any of them resulted in a loss, then after you list them all, you want to display win or loss depending on if there was a loss among the results. I copied your code and added 3 lines marked with #ADDED. Add those three lines to acheive what I described.