所用到的函数为explode() 函数把字符串分割为数组str_replace() 函数利用一个字符串更换字符串中的另一些字符。explode(separator,string,limit)参数描述separator必需。规定在哪里分割字符串。string必需。要分割的字符串。limit可选。规定所返回的数组元素的最大数目。 例如$str="[16],[17],[18]";$shuzhu=explode(",",$str)); 即:Array([0] =>16[1] => 17[2] =>18)foreach ($shuzhuas $item) { $member_id=str_replace("[","",$item); $member_id=str_replace("]","",$member_id);}
