View Single Post
Old 10-24-2009, 05:46 PM   #3 (permalink)
delayedinsanity
is cute and cuddly
 
delayedinsanity's Avatar
 
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
delayedinsanity is on a distinguished road
Default

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_mergearray_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. :)
delayedinsanity is offline  
Reply With Quote