Possible Duplicate:
How to create comma separated list from array in PHP?
I have a Wordpress site, and i use the plugin Magic Fields. To echo the inputs from the plugin I use these code:
<?php
$my_list = get('startopstilling_test');
foreach($my_list as $element){
echo $element . ",";
} ?>
The code echo this:
Casillas,Albiol,Xabi Alonso,Kaka,
But i would like to remove the last comma that makes it look like this:
Casillas,Albiol,Xabi Alonso,Kaka
Can anyone help me?