$str = "爸爸,妈妈,奶奶;爷爷.外公,外伯,舅舅";
$net = explode(',',$str);
如何将分害成
1=>爸爸
2=>妈妈
3=>奶奶
4=>爷爷
5=>外公
6=>外伯
7=>舅舅
$str = "爸爸,妈妈,奶奶;爷爷.外公,外伯,舅舅";$str = str_replace(';', ',', $str);$str = str_replace('.', ',', $str);$net = explode(',',$str);var_dump($net);
$net = preg_split('/[,;.]/',$str);print_r($net);