$holder = \'\'; foreach($fields as $key){ $holder .= $key.\', \'; } echo $holder;
I have the code above, it outputs \"a, b, c, \" I want to r
You can use implode() to join all array elements together :
implode()