Angelo Zanetti wrote:
HI all,
I am using the array_diff function.
The problem im having is the array that gets returned. Well here's an
example:
this is where i assign the values to two different arrays
$a[]=0;
$a[]=1;
$a[]=2;
$a[]=3;
$b[]=1;
$b[]=4;
$b[]=0;
$diff = array_diff_assoc($a, $b);
/*
sorry I'm not using array_diff_assoc just array_diff...
Jason Barnett wrote:
Angelo Zanetti wrote:
HI all,
I am using the array_diff function.
The problem im having is the array that gets returned. Well here's an
example:
this is where i assign the values to two different arrays
Angelo Zanetti wrote:
sorry I'm not using array_diff_assoc just array_diff...
/* Should also be able to re-index the diff of two arrays */
$diff = array_values(array_diff($a, $b));
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
3 matches
Mail list logo