Home > Backend Development > PHP Tutorial > 高分算法,待中.

高分算法,待中.

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
Release: 2016-06-13 11:37:48
Original
985 people have browsed it

高分求一个算法,在线等待中...

本帖最后由 sibang 于 2013-10-16 22:08:17 编辑
<?PHP<br />$arr=Array(<br />	Array('a','b','c'),<br />	Array('d','e','f'),<br />	Array('g','h','i'),<br />	//第二層array的個數是未知的,爲了方便舉例所以只寫了3個<br />);<br /><br />$x3=iArray($arr,3);<br />Echo '<pre class="brush:php;toolbar:false">',Var_Dump($x3),'
Copy after login
';
/**
期望的結果是:
array {
'adg','adh','adi',
'aeg','aeh','aei',
'afg','afh','afi',
'bdg','bdh','bdi',
'beg','beh','bei',
'bfg','bfh','bfi',
'cdg','cdh','cdi',
'ceg','ceh','cei',
'cfg','cfh','cfi',
}
/**/

$x2=iArray($arr,2);
Echo '
',Var_Dump($x2),'
Copy after login
';
/**
期望的結果是:
array {
'ad','ae','af',
'ag','ah','ai',
'bd','be','bf',
'bg','bh','bi',
'cd','ce','cf',
'cg','ch','ci',
'dg','dh','di',
'eg','eh','ei',
'fg','fh','fi',
}
/**/
Related labels:
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template