Home  >  Article  >  php教程  >  假设有如下数组 $words=array("肯","德","基");

假设有如下数组 $words=array("肯","德","基");

PHP中文网
PHP中文网Original
2016-05-23 16:39:071147browse

php代码

<?php


    $num = 4; //数组长度,可自行规定
    $arr = array();

    //获取数组
    for($i=0; $i $v1)
        {
            foreach ($selectArr as $k2 => $v2)
            {
                if (!strstr($v1,$v2))
                {
                    $val = $v1.$v2;
                    $result[] = "$val";
                }
            }
        }

        if (!empty($result))
        {
            $ret = pinjie($result,$selectArr);
        }

        if(!empty($ret))
        {
            $result=array_merge($ret,$result);
        }
        return $result;
    }
?>

 以上就是假设有如下数组 $words=array("肯","德","基");的内容,更多相关内容请关注PHP中文网(www.php.cn)!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn