Doppelte Werte in einem array löschen


function remove_dup($matriz) {
   $aux_ini=array();
   $entrega=array();
   for($n=0;$n<count($matriz);$n++) {
      $aux_ini[]=serialize($matriz[$n]);
   }
   $mat=array_unique($aux_ini);
   for($n=0;$n<count($matriz);$n++) {
      $entrega[]=unserialize($mat[$n]);
   }
   foreach ($entrega as $key => $row){
      if (!is_array($row)) { unset($entrega[$key]); }
   }
   return $entrega;
}

Posts Tagged delete

Archives by Month: