note 75269 modified in function.array-diff-assoc by danbrown

From: Date: Sat, 14 Mar 2009 14:51:40 +0000
Subject: note 75269 modified in function.array-diff-assoc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151899@lists.php.net to get a copy of this message
To diff between n-dimensional array, juste use this : <?php function array_diff_values($tab1, $tab2) { $result = array(); foreach($tab1 as $values) if(! in_array($values, $tab2)) $result[] = $values; return $result; } ?> --was-- To diff between n-dimensional array, juste use this : function array_diff_values($tab1, $tab2) { $result = array(); foreach($tab1 as $values) if(! in_array($values, $tab2)) $result[] = $values; return $result; } http://php.net/manual/en/function.array-diff-assoc.php

« previous php.notes (#151899) next »