SyntaxFix
Write A Post
Hire A Developer
Questions
My solution, also quite simple..
$array = [...]; $last = count($array) - 1; foreach($array as $index => $value) { if($index == $last) // this is last array else // this is not last array }