note 78420 added to function.array-unique
| From: | array_unique_FULL at osu1 dot php dot net | Date: | Thu, 11 Oct 2007 07:58:06 +0000 |
| Subject: | note 78420 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-131298@lists.php.net to get a copy of this message | ||
<?php function array_unique_FULL($array){
foreach($array as $k => $v){
if(is_array($v)){
$ret=F::array_unique_FULL(array_merge($ret,$v));
}else{
$ret[$k]=$v;
}
}//for
return array_unique($ret);
}
?>
Array
(
[0] => js/pt.js
[1] => js/selectfile.js
[2] => js/pt.js
[3] => js/proyecto.js
[4] => Array
(
[0] => Array
(
[0] => js/selectfile.js
[1] => js/selectfile.js
[2] => js/y otro mas.js
)
[1] => q se yo
)
)
go array_unique_FULL()!!!!
Array
(
[0] => js/pt.js
[1] => js/selectfile.js
[3] => js/proyecto.js
[6] => js/y otro mas.js
[5] => q se yo
)
----
Server IP: 69.147.83.197
Probable Submitter: 190.137.12.203
----
Manual Page -- http://www.php.net/manual/en/function.array-unique.php
Edit -- https://master.php.net/note/edit/78420
Del: integrated -- https://master.php.net/note/delete/78420/integrated
Del: useless -- https://master.php.net/note/delete/78420/useless
Del: bad code -- https://master.php.net/note/delete/78420/bad+code
Del: spam -- https://master.php.net/note/delete/78420/spam
Del: non-english -- https://master.php.net/note/delete/78420/non-english
Del: in docs -- https://master.php.net/note/delete/78420/in+docs
Del: other reasons-- https://master.php.net/note/delete/78420
Reject -- https://master.php.net/note/reject/78420
Search -- https://master.php.net/manage/user-notes.php