remove last 3 character from string php

119

$string = rtrim($string, ',');
echo substr($string, 0, -3);

Comments

Submit
0 Comments