> >> >Ok, I found out what the problem was.  I'm still curious
> >> >why the problem is occuring.
> >> >> if( $tmpArray[errorNumber] & $typesToDisplay ) {  
> >> you're using the bitwise & when you want the logical &&
> >No, I actually wanted to use the bitwise &.  I wanted to see
> >if the "errorNumber" was in $typesToDisplay.
> without seeing the code I would guess you should be using in_array().

Except that $typesToDisplay is not an array.  It is made up of
something like this:

$typesToDisplay = ( 1 | 2 | 4 | 8 | 32 | 64 );

And to see if the errorNumber is part of the above, you bitwise
"&" it.

Chris

Reply via email to