note 112925 added to function.array-flip
| From: | GregH. | Date: | Wed, 07 Aug 2013 21:39:48 +0000 |
| Subject: | note 112925 added to function.array-flip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-195905@lists.php.net to get a copy of this message | ||
Found this to be a handy way to flip XML array recursively:
function array_flip_recursive($arr) {
foreach ($arr as $key => $val) {
if (is_array($val))
$arr[$key] = array_flip($val);
}
return $arr;
}
----
Server IP: 69.147.83.199
Probable Submitter: 69.49.208.38
----
Manual Page -- http://php.net/manual/en/function.array-flip.php
Edit -- https://master.php.net/note/edit/112925
Del: integrated -- https://master.php.net/note/delete/112925/integrated
Del: useless -- https://master.php.net/note/delete/112925/useless
Del: bad code -- https://master.php.net/note/delete/112925/bad+code
Del: spam -- https://master.php.net/note/delete/112925/spam
Del: non-english -- https://master.php.net/note/delete/112925/non-english
Del: in docs -- https://master.php.net/note/delete/112925/in+docs
Del: other reasons-- https://master.php.net/note/delete/112925
Reject -- https://master.php.net/note/reject/112925
Search -- https://master.php.net/manage/user-notes.php