Answers for "trim comma from variable in 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

Browse Popular Code Answers by Language