As far as I'm aware, the first argument to the in_array() function is the needle (what 
you're searching for) and the second is the array to be searched through (the 

So if $type represents what you're searching for, then it would be written as:

in_array($type, $CheckArr);

If you supply the third argument as TRUE, then the search becomes case sensitive, I 


>>> "Rw" <[EMAIL PROTECTED]> 07/11/02 02:25PM >>>
This is a continue from this morning (thanks so much for the responses)..
yielding a data type mismatch:

  $CheckArr = array("Periodic", "Sale", "Return");
  IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr, $type))
   PRINT "<BR>$approvalcode";
   PRINT " ";
   PRINT "$type";

This line:   IF (SUBSTR($approvalcode,0,1) == "Y" && in_array($CheckArr,

Causes this error:
Warning: Wrong datatype for second argument in call to in_array in
/home/www/globalspacesolutions/php3/billingtrx.php on line 47

PHP General Mailing List (
To unsubscribe, visit: 

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to