Generally, developers use loops to create a comma separated lists in stringformat. But, after the loop you end with a trailing comma at the end of the string.
$string = "a, b, c, d,"; $filtered = rtrim($string, ','); echo $filtered;
a, b, c, d
Hello Friends! I am Ramana a part time blogger from Hyderabad.
0 comments:
Post a Comment