note 116704 added to function.array-unique
| From: | amitasthana4u at gmail dot com | Date: | Fri, 13 Feb 2015 11:49:30 +0000 |
| Subject: | note 116704 added to function.array-unique | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-201724@lists.php.net to get a copy of this message | ||
Array Unique including case insensitive and trimming the spaces in array.
This function will give you a array which is case insensitive also side spaces are trimmed.
function array_iunique($array_value) {
foreach ($array_value as $key => $value) {
$array[] = trim($value);
}
return array_intersect_key($array,array_unique(
array_map(strtolower,$array)));
}
----
Server IP: 72.52.91.14
Probable Submitter: 122.179.156.144
----
Manual Page -- http://php.net/manual/en/function.array-unique.php
Edit -- https://master.php.net/note/edit/116704
Del: integrated -- https://master.php.net/note/delete/116704/integrated
Del: useless -- https://master.php.net/note/delete/116704/useless
Del: bad code -- https://master.php.net/note/delete/116704/bad+code
Del: spam -- https://master.php.net/note/delete/116704/spam
Del: non-english -- https://master.php.net/note/delete/116704/non-english
Del: in docs -- https://master.php.net/note/delete/116704/in+docs
Del: other reasons-- https://master.php.net/note/delete/116704
Reject -- https://master.php.net/note/reject/116704
Search -- https://master.php.net/manage/user-notes.php