按指定字符分割字符串
<?php
$aera_p="上海,海南,北京,重庆,四川";
$aa=explode(",",$aera_p); //explode() 函数把字符串分割为数组
//$aa=split("[,]",$aera_p); //截取以","为准的字符串,slipt为用正则表达式判断
$BRCount = substr_count($aera_p, ','); //计算","为多少个
for($i=0;$i<=$BRCount;$i++){
echo $aa[$i]."<br>";
}
?>