are in arrays. When checking one of the arrays for a number thats in
a variable in an object, I cant seem to get the search to work.
However I can get the search to work by putting in one instance of
that variable. But then comparing the two shows they're both the same.
I don't get how if they're both the same one works and one doesn't.
This is from inside one of the foreach statements:
Expand|Select|Wrap|Line Numbers
- if (in_array($val->onumber,$ponum))
- echo "FOUND VARIABLE";
- if (in_array(358737,$ponum))
- echo "FOUND THE LITERAL";
- if ($val->onumber == 358737)
- echo "WHYWHYWHY";
directly but not the variable, when it admits they're the same?
BTW, the in_array is just what I was using to check this. What I
really want to do is an array_search, that was doing the same thing.
Any suggestions?