title: rtrim not working string with html elements
body: <p>I have a problem with <code>rtrim()</code> function in php. I have string like this one:</p>
  
  <pre><code>$str = "&lt;a id="AccountDocument_11" href="/view/id/11"&gt;Picture of Collateral&lt;/a&gt; [2017-04-01],";
  </code></pre>
  
  <p>Like this, embed the string in array. <br>
  I want to remove that last comma in this string. rtrim not working.<br>
   When i remove that html elements from that string, <code>rtrim()</code> works perfectly. anyone help?</p>