title: PHP: Concatenate array element into string with ',' as the separator
body: <p>Is there a quick way ( existing method)  Concatenate array element into string with ',' as the separator? Specifically I am looking for a single line of method replacing the following routine:</p>
  
  <pre><code>//given ('a','b','c'), it will return 'a,b,c'
  private static function ConstructArrayConcantenate($groupViewID)
  {
      $groupIDStr='';
      foreach ($groupViewID as $key=&gt;$value) {
          $groupIDStr=$groupIDStr.$value;
          if($key!=count($groupViewID)-1)
              $groupIDStr=$groupIDStr.',';
      }       
  
      return $groupIDStr;
  }
  </code></pre>