If you really want to use explode and implode, you could do something like this :
First, explode the string you have :
$data= "a,b,c,d,e";
$list = explode(',', $data);
var_dump($list);
Which will give you :
array
0 => string 'a' (length=1)
1 => string 'b' (length=1)
2 => string 'c' (length=1)
3 => string 'd' (length=1)
4 => string 'e' (length=1)
Then, add the new elements :
$to_add = array('cc', 'gg');
$new_list = array_merge($list, $to_add);
var_dump($new_list);
$new_list
is now :
array
0 => string 'a' (length=1)
1 => string 'b' (length=1)
2 => string 'c' (length=1)
3 => string 'd' (length=1)
4 => string 'e' (length=1)
5 => string 'cc' (length=2)
6 => string 'gg' (length=2)
And, finally, implode the $new_list, using ',' as a separator :
$output = implode(',', $new_list);
var_dump($output);
And you get :
string 'a,b,c,d,e,cc,gg' (length=15)
Of course, if you start with an array, that's one less explode to do ; and if the data you want to add is not an array, that's one more explode to do...
But, as Rob pointed out, in the simple case you are presenting, there is no need for such a complicated piece of code : strings concatenations will be more than enough ;-)
The advantage with the array/explode/implode-based solution is that you can work on the final array before imploding it into a string (say, for instance, you can sort it)