[PHP] Re: in_array not operating as 'expected'

2004-11-09 Thread Ing. Ivo F.A.C. Fokkema
Thanx both of you, I know the type-casting bit and have noticed the third parameter which 'fixes' the in_array issue. I just missed 'test' == 0 implied (int) 'test' == 0. Typecasting a string to integer indeed returned 0. Typecasting is of course not necessary within if statements, resulting in my

[PHP] Re: in_array not operating as 'expected'

2004-11-09 Thread Bogdan Stancescu
Apart from Marek's reply, you should probably check the in_array() documentation (look at the third, optional parameter) and search for type casting on php.net. Cheers, Bogdan Ing. Ivo F.A.C. Fokkema wrote: Hi guys and gals, I'm not screaming "Bug! Bug!" but this _does_ look 'illogical' to me. I