Recorte la coma de la variable en PHP
rtrim($my_string,',');
Ankur
rtrim($my_string,',');
preg_replace('/^([^,]*).*$/', '$1', $print);
substr($string, 0, strrpos($string.",", ","));