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
If you really wanna have the loop:
$values = ""; foreach ($stuffs as $stuff) { $values != "" && $values .= ","; $values .= $stuff; } echo $values;
I suggest using implode, but the loop can really give you more power if you wanna do some further stuff.