Hello Guys i need to do this,
I have a common loop
foreach ($stuffs as $stuff) { echo $stuff; }
Lets assume $stuff is an \'id\' of a my
This worked in my case (detects if isn't the loop last iteration):
foreach($array as $key => $val){ ... if($key!==count($array)-1){echo ',';} }