Forum Moderators: coopster
However that's not dynamic. If you had four keys then it would read
key1,key2,key3key4,
you could split them into an array to make them dynamic
this will be dynamic and remove the last comma no matter how many keys you give it
$arr = explode(",", "key1,key2,key3,key4,key5");
foreach($arr as $key => $i){
if($key != (count($arr) - 1)){
echo($i.",");
}//if
else{
echo($i);
}//else
}//foreach