I want to echo a variable at the last iteration of a foreach loop, only counting when a conditional is met inside a loop.
Here is what I have tried:
$var =