Page 1 of 1

array_diff

Posted: Tue Jun 27, 2006 8:45 am
by sayantan_os
hi ppl ...... i have been trying to use two arrays of sizes around 150 elements each .......... now when i compare the 2 using array_diff some elements present in both the arrays get displayed as unique .............. the arrays are of single dimension ........... is there a size constraint ??? SOS !!!

Re: array_diff

Posted: Tue Jun 27, 2006 9:09 am
by aerodromoi
sayantan_os wrote:hi ppl ...... i have been trying to use two arrays of sizes around 150 elements each .......... now when i compare the 2 using array_diff some elements present in both the arrays get displayed as unique .............. the arrays are of single dimension ........... is there a size constraint ??? SOS !!!
Have you considered that array_diff uses a strict comparison operator?

aerodromoi

Posted: Tue Jun 27, 2006 10:54 am
by RobertGonzalez
Lots of good information on array_diff can be found on the array_diff page of the PHP Manual.