title: Remove any comma before or after a string?
body: <p>My string is</p>
  
  <pre><code>$string = ",name2,name2,name3,";
  </code></pre>
  
  <p>I want to make it like;</p>
  
  <pre><code>$string = "name2,name2,name3";
  </code></pre>
  
  <p>That is, to remove first and last comma from that string, any clue as to how to accomplish this either through regex or anything else?</p>
  
  <p>Thanks.</p>