title: I want to change the separtor in this function
body: <p>this function</p>
  
  <pre><code>function genTags($tags,$sep=',')
  {
  
      $tags = preg_replace(array('/ ,/','/, /'),',',$tags);
      $tags = preg_replace( "`[,]+`" , ",", $tags);
      $tag_array = explode($sep,$tags);
      foreach($tag_array as $tag)
      {
          if(isValidtag($tag))
          {
              $newTags[] = $tag;
          }
  
      }
  
      if(is_array($newTags))
          $tagString = implode(',',$newTags);
      else
          $tagString = 'no-tag';
      return $tagString;
  }
  </code></pre>
  
  <p>generate tags separated by ',' what to change to have spaces between tags instead thanks</p>