Re: [PHP] in_array() related problem

2006-11-05 Thread tamcy
Hi, Thanks for your reply. After a sleep overnight I found I said something really stupid. Arrays are compared in deep, and also for objects. I really forgot the old PHP4 way and thought PHP5 compares object simply by address when using ==, which is not the real case. I need to use === for compar

Re: [PHP] in_array() related problem

2006-11-04 Thread Tom Atkinson
Try like this: var_dump(in_array($a, $test, true)); Richard Lynch wrote: Try providing a custom comparison function. Almost for sure, PHP is attempting to "test" the == by a deeper scan than you think. On Fri, November 3, 2006 10:56 am, tamcy wrote: Hello all, I'm new to this list. To not

Re: [PHP] in_array() related problem

2006-11-03 Thread Richard Lynch
Try providing a custom comparison function. Almost for sure, PHP is attempting to "test" the == by a deeper scan than you think. On Fri, November 3, 2006 10:56 am, tamcy wrote: > Hello all, > > I'm new to this list. To not flooding the bug tracking system I hope > to clarify some of my understand