title: How do I remove the last comma from a string using PHP?
body: <p>I am using a loop to get values from my database and my result is like:</p>
  
  <pre><code>'name', 'name2', 'name3',
  </code></pre>
  
  <p>And I want it like this:</p>
  
  <pre><code>'name', 'name2', 'name3'
  </code></pre>
  
  <p>I want to remove the comma after the last value of the loop.</p>