Delete the last Char of a PHP String : <p>My Problem : i cant delete the last char of a string : </p>

<pre><code>  foreach($_POST['checkbox'] as $item)
{
    $string .= $item.', ';
}

$markte=rtrim($string ,", ");
</code></pre>
