Remove Last String if its ', '
<p>i have string like this </p>

<pre><code>$string =  'aaaaaa, bbbbbb, cccccc, ';
</code></pre>

<p>and i want to modified  it to be like this</p>

<pre><code>$string = 'aaaaaa, bbbbbb, cccccc';
</code></pre>

<p>the last ',' and space is removed.</p>

<p>how to do this in php?
what is the function needed the achieve that?</p>

<hr>

<p>my full code is like this</p>

<pre><code>if(isset($_POST['accomodation']))   $accomodation = 'Accomodation, ';
if(isset($_POST['dance']))          $dance = 'Dance Lessons, ';
if(isset($_POST['vacation']))       $vacation   = 'Vacation planning, ';
if(isset($_POST['group']))      $group = 'Group Vacation, ';
if(isset($_POST['inprivate']))      $inprivate = 'Private Vacation, ';
if(isset($_POST['land']))           $land = 'Land purchase/lease';
if(isset($_POST['all']))            $all    = 'All';

@$interest = $accomodation.$dance.$vacation.$group.$inprivate.$land;
@echo $string;
</code></pre>

<p>*sorry for such dumb question, it's been so long i didn't touch native PHP programming</p>
