note 75470 added to function.array-combine

From: Date: Thu, 31 May 2007 19:48:19 +0000
Subject: note 75470 added to function.array-combine
Groups: php.notes 
Request: Send a blank email to php-notes+get-127086@lists.php.net to get a copy of this message
If you have an array and include duplicated element, and you want to that this element just show once in array, then this function is very good solution. function array_no_duplicate($array_tmb){ $new_array = array(); for($i = 0; $i < count($array_tmb); $i++){ $van = 0; for($j = 0; $j < count($array_tmb); $j++){ if( $new_array[$j] == $array_tmb[$j]) $van = 1; } if($van == 0){ $new_array[$i] = $array_tmb[$i]; }else continue; } return $new_array; } ---- Server IP: 195.70.37.52 Probable Submitter: 86.101.78.147 ---- Manual Page -- http://www.php.net/manual/en/function.array-combine.php Edit -- https://master.php.net/note/edit/75470 Del: integrated -- https://master.php.net/note/delete/75470/integrated Del: useless -- https://master.php.net/note/delete/75470/useless Del: bad code -- https://master.php.net/note/delete/75470/bad+code Del: spam -- https://master.php.net/note/delete/75470/spam Del: non-english -- https://master.php.net/note/delete/75470/non-english Del: in docs -- https://master.php.net/note/delete/75470/in+docs Del: other reasons-- https://master.php.net/note/delete/75470 Reject -- https://master.php.net/note/reject/75470 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#127086) next »