List Info

Thread: note 78420 added to function.array-unique




note 78420 added to function.array-unique
user name
2007-10-11 02:58:06
<?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  -- h
ttps://master.php.net/note/delete/78420/integrated
Del: useless     -- http
s://master.php.net/note/delete/78420/useless
Del: bad code    -- htt
ps://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     -- http
s://master.php.net/note/delete/78420/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78420
Reject      -- https://mast
er.php.net/note/reject/78420
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


note 78420 modified in function.array-unique by james
user name
2007-10-18 21:09:50
<?php
function array_unique_FULL($array) {
  foreach($array as $k => $v) {
    if (is_array($v)) {
      $ret = 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
)

--was--
<?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
)

ht
tp://php.net/manual/en/function.array-unique.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )