Answers for "php remove comma at the end of string"

PHP
4

remove last comma from string php

rtrim($my_string, ',');
Posted by: Guest on November-12-2020
0

remove string after comma in php

preg_replace('/^([^,]*).*$/', '$1', $print);
substr($string, 0, strrpos($string.",", ","));
Posted by: Guest on March-18-2021

Code answers related to "php remove comma at the end of string"

Browse Popular Code Answers by Language