10-24-2009, 05:46 PM
|
#3 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
Thanks Tony, I wound up just looping through it directly; The above method won't work on the array for me as a whole due to the fact that I'd still have to loop through and merge each key seperately, and trying to run the intersect and diff on the top level of the array doesn't work.
Were I to loop through I'm sure something along the lines of,
PHP Code:
$count = count( $arr ); for ( $i = 0; $i <= $count; $i++ ) { $arr[$i] = array_merge( array_diff( $arr[$i], $arr_two[$i] ), array_diff( $arr_two[$i.....
Would do the trick, but it becomes redundant by the time I wind up using a loop. Array-fu!
I'm a huge fan of array_s(p)?lice, array_search, et al, but there's some I've never had the chance to use yet and it was nice to play with them a little. :)
|
|
|
|