php remove last character from string

35

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

Comments

Submit
0 Comments