原始字符串:“58|189”分离出来的效果:A:58B:189(以“|”为分界线,前后分离出来)<?$STR_1="58|189";//原始字符串$STR_2=explode("|",$STR_1);//explode分离函数的应用echo$STR_2[0];//结果显示58echo$STR_2[1];//结果显示189?>arrayexplode(stringseparator,strin..
分类:
Web程序 时间:
2014-12-18 19:11:07
阅读次数:
189
create_code.php<?phpsession_start();//生成验证码图片header("Content-type:p_w_picpath/png");//全数字$str="1,2,3,4,5,6,7,8,9,a,b,c,d,f,g";//要显示的字符,可自己进行增删$list=explode(",",$str);$cmax=count($list)-1;$verifyCode=‘‘;for($i=0;$i<5;$i++){$rand..
分类:
Web程序 时间:
2014-12-17 18:45:32
阅读次数:
184
1 - (void)explode:(id)aView level:(int)aLevel {2 for (int i = 0; i < aLevel; i++)3 printf("-");4 printf("%s:%s/n"...
分类:
其他好文 时间:
2014-12-16 18:55:19
阅读次数:
146
public function getendmouthtime() ? ? { ? ? ? ? $date=date("Y-m",time()); ? ? ? ? $date_arr=explode(‘-‘,$date); ? ? ? ? $year=$date_arr[0]; ? ? ? ? $month=$date_arr[1]; ? ? ? ...
分类:
Web程序 时间:
2014-12-15 17:28:41
阅读次数:
263
经常,需要在CAD中插入块,比如图框,它的类型是INSERT,而不是Line和PolyLine。一般情况下,我们是不会去编辑它的,但有的时候需要选择它,比如在选择打印范围时,默认为过滤掉INSERT类型(其实这是不合理的,考虑不周全的),所以现在要将块转为实体。
直接使用CAD分解(EXPLODE)...
分类:
其他好文 时间:
2014-12-13 15:00:13
阅读次数:
301
1 字符串大小写函数 strtoupper($str) strtolower($str) 2 字符串切割函数 explode(',',$str) join(',',$str) implode(',',$str) 3 字符串长度函数 s...
分类:
Web程序 时间:
2014-12-12 16:14:00
阅读次数:
112
都是分割,区别就是,split要用转移字符:1. $test = end(explode('.', 'abc.txt')); echo $test;//output txt2. $test1 = end(split('.','abc.txt')); echo $test1;//no output.....
分类:
Web程序 时间:
2014-12-08 19:30:33
阅读次数:
188
1.函数explode(); 这个是字符串转化为数组 ,implode() ;这个是数组转化为字符串。$array=explode(separator,$string);$string=implode(glue,$array);使用和理解这两个函数的关键之处是分隔符(separator)和胶合符(g...
分类:
编程语言 时间:
2014-12-08 13:40:55
阅读次数:
256
控制器field("id,name,pid,path,concat(path,'-',id) as bpath")->order('bpath')->select();foreach($list as $key=>$value){$list[$key]['count']=count(explode(...
分类:
Web程序 时间:
2014-11-30 16:45:09
阅读次数:
227
做个备份年纪大了,都不愿意自己思考了$str = file_get_contents($tmpfilename);//获得内容 $arr = explode("\n",$str);//分行存入数组 foreach($arr as $row){//遍历每行 echo $row,''; }
分类:
Web程序 时间:
2014-11-27 23:24:16
阅读次数:
180