php
//利用 explode 函数分割字符串到数组
$source = "hello1,hello2,hello3,hello4,hello5";//按逗号分离字符串
$hello = explode...截取去掉最后/第一个字符
$newstr = substr($str,0,strlen($str)-1);
取得数组的具体数据
$date = "04,30";
list($month, $...day) = split ('[,.-]', $date);
echo "Month: $month; Day: $day;<br / \n";
去除数组中重复的元素值 array_unique(...($a);
JSsplit
<script language="javascript"
str="2,2,3,5,6,6"; //这是一字符串
var strs= new Array(); //定义一数组...}
</script
explode() 函数把字符串分割为数组。