note 88501 added to function.array-chunk
| From: | dead dot screamer at seznam dot cz | Date: | Tue, 27 Jan 2009 10:28:34 +0000 |
| Subject: | note 88501 added to function.array-chunk | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-149827@lists.php.net to get a copy of this message | ||
This function can be used to reverse effect of <?php array_Chunk()?>.
<?php
function array_Unchunk($array)
{
return call_User_Func_Array('array_Merge',$array);
}
header('Content-Type: text/plain');
$array=array(
array(
'Black Canyon City',
'Chandler',
'Flagstaff',
'Gilbert',
'Glendale',
'Globe',
),
array(
'Mesa',
'Miami',
'Phoenix',
'Peoria',
'Prescott',
'Scottsdale',
),
array(
'Sun City',
'Surprise',
'Tempe',
'Tucson',
'Wickenburg',
),
);
var_Dump(array_Unchunk($array));
?>
Output:
array(17) {
[0]=>
string(17) "Black Canyon City"
[1]=>
string(8) "Chandler"
[2]=>
string(9) "Flagstaff"
[3]=>
string(7) "Gilbert"
[4]=>
string(8) "Glendale"
[5]=>
string(5) "Globe"
[6]=>
string(4) "Mesa"
[7]=>
string(5) "Miami"
[8]=>
string(7) "Phoenix"
[9]=>
string(6) "Peoria"
[10]=>
string(8) "Prescott"
[11]=>
string(10) "Scottsdale"
[12]=>
string(8) "Sun City"
[13]=>
string(8) "Surprise"
[14]=>
string(5) "Tempe"
[15]=>
string(6) "Tucson"
[16]=>
string(10) "Wickenburg"
}
----
Server IP: 147.32.160.17
Probable Submitter: 81.19.15.110
----
Manual Page -- http://www.php.net/manual/en/function.array-chunk.php
Edit -- https://master.php.net/note/edit/88501
Del: integrated -- https://master.php.net/note/delete/88501/integrated
Del: useless -- https://master.php.net/note/delete/88501/useless
Del: bad code -- https://master.php.net/note/delete/88501/bad+code
Del: spam -- https://master.php.net/note/delete/88501/spam
Del: non-english -- https://master.php.net/note/delete/88501/non-english
Del: in docs -- https://master.php.net/note/delete/88501/in+docs
Del: other reasons-- https://master.php.net/note/delete/88501
Reject -- https://master.php.net/note/reject/88501
Search -- https://master.php.net/manage/user-notes.php