Calculate an algorithm with high scores and wait online... This post was last edited by sibang from 2013-10-1622: 08: 17 & lt ;? PHP $ arrArray (Array (a, B, c), Array (d, e, f), Array (g, h, I ), the number of second-level arrays is unknown, so we only got 3 values for the convenience examples.) calculate an algorithm with high scores and wait online...
This post was last edited by sibang at 22:08:17, January 16 ,.
$ Arr = Array (
Array ('A', 'B', 'C '),
Array ('D', 'e', 'F '),
Array ('G', 'H', 'I '),
// The number of items in the second array is unknown. for the convenience of the example, only three
);
$ X3 = iArray ($ arr, 3 );
Echo'',Var_Dump($x3),'
';
/**
The expected result is:
Array {
'Adg', 'Adh ', 'AD ',
'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),'
';
/**
The expected result is:
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', 'ff', 'Fi ',
}
/**/
Share:
------ Solution --------------------
A lot of flowers