note 80631 added to ref.array
| From: | reallyquickfunction at osu1 dot php dot net | Date: | Fri, 25 Jan 2008 20:37:16 +0000 |
| Subject: | note 80631 added to ref.array | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-135417@lists.php.net to get a copy of this message | ||
function array_flatten($a){ //flattens multi-dim arrays (distroys keys)
$ab = array(); if(!is_array($a)) return $ab;
foreach($a as $value){
if(is_array($value)){
$ab = array_merge($ab,array_flatten($value));
}else{
array_push($ab,$value);
}
}
return $ab;
}
----
Server IP: 208.69.120.35
Probable Submitter: 66.202.7.251
----
Manual Page -- http://www.php.net/manual/en/ref.array.php
Edit -- https://master.php.net/note/edit/80631
Del: integrated -- https://master.php.net/note/delete/80631/integrated
Del: useless -- https://master.php.net/note/delete/80631/useless
Del: bad code -- https://master.php.net/note/delete/80631/bad+code
Del: spam -- https://master.php.net/note/delete/80631/spam
Del: non-english -- https://master.php.net/note/delete/80631/non-english
Del: in docs -- https://master.php.net/note/delete/80631/in+docs
Del: other reasons-- https://master.php.net/note/delete/80631
Reject -- https://master.php.net/note/reject/80631
Search -- https://master.php.net/manage/user-notes.php