rtrim($my_string,',');
preg_replace('/^([^,]*).*$/', '$1', $print); substr($string, 0, strrpos($string.",", ","));