remove last character from string php

37

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

Comments

Submit
0 Comments