去掉字符串最后一个字符

$nid_list = substr($nid_list, 0, -1);
原文地址:https://www.cnblogs.com/droko/p/2337540.html