Answers for "remove value from comma separated string php"

PHP
1

trim comma from variable in php

rtrim($my_string,',');
Posted by: Guest on October-22-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 "remove value from comma separated string php"

Browse Popular Code Answers by Language