I want to remove the excess comma in my output string inside a parenthesis.
$data= "item_id IN ( '1','2',) AND nt_id IN ( 'er1','er2',) AND";
I removed the Excess 'AND' by using rtrim funtion.
$trimValues = rtrim($data,'AND') ;
But how can I remove the comma inside a parenthesis?