note 111814 added to function.array-unique
| From: | yosef_cool_ha at hotmail dot com | Date: | Sun, 31 Mar 2013 21:45:11 +0000 |
| Subject: | note 111814 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-194280@lists.php.net to get a copy of this message | ||
if you wish to unique the arrays recusively(multi dimensional) no matter how deep hope this function
can help you:
function array_unique_recusive($arr){
foreach($arr as $key=>$value)
if(gettype($value)=='array')
$arr[$key]=array_unique_recusive($value);
return array_unique($arr,SORT_REGULAR);
}
----
Server IP: 69.147.83.199
Probable Submitter: 109.64.215.80
----
Manual Page -- http://php.net/manual/en/function.array-unique.php
Edit -- https://master.php.net/note/edit/111814
Del: integrated -- https://master.php.net/note/delete/111814/integrated
Del: useless -- https://master.php.net/note/delete/111814/useless
Del: bad code -- https://master.php.net/note/delete/111814/bad+code
Del: spam -- https://master.php.net/note/delete/111814/spam
Del: non-english -- https://master.php.net/note/delete/111814/non-english
Del: in docs -- https://master.php.net/note/delete/111814/in+docs
Del: other reasons-- https://master.php.net/note/delete/111814
Reject -- https://master.php.net/note/reject/111814
Search -- https://master.php.net/manage/user-notes.php