Blogger Information
Blog 6
fans 0
comment 0
visits 4819
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
模拟内置函数考察点
Maple201的博客
Original
712 people have browsed it

不使用php函数,用方法写一个翻转字符串的函数

function str_rev($str){

for($i=0;true;$i++){

if(isset($str[$i])){

break;

}

}

$return='';

for($j=$i-1;$j>=0;$j--){

$return.=$str[$j];

}

return $return;

}


写一个函数不使用array_merger完成多个数组的合并

function array_mer(){

    $arrays = func_get_args();

    foreach($arrays as $arr){

        if(is_array($arr)){

            foreach($arr as $val){

                    $return[] = $val  

 }

}

}

return $return;

}

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post