复制代码 代码如下:<?php/** * PHP 实现explort() 功能的详解 */$str = ‘,1,2,3,4,321321,aaa,bbb’;function myExplode($seg,$str,$limit=0){ $_ret = array(0=>”); $len = strlen($str); $slen = strlen($seg); $_limit = 0; for($i=0; $i<$len; $i++){ if(substr($str,$i,$slen) == $seg ){ $_limit++;