The question is simple. I have a foreach loop in my code:
foreach
foreach($array as $element) { //code }
In this loop, I want to r
With Keys and Values this works as well:
foreach ($array as $key => $value) { if ($value === end($array)) { echo "LAST ELEMENT!"; } }