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
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
haystack).
So if $type represents what you're searching for, then it would be written as:
in_array($type, $CheckArr);
If you
That did it!
Thanks!
- Original Message -
From: Martin Clifford [EMAIL PROTECTED]
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Thursday, July 11, 2002 1:32 PM
Subject: Re: [PHP] Newbie continued..wrong datatype
As far as I'm aware, the first argument to the in_array() function
The manual says the second parameter needs to be an array. I assume it
is not, but you have not shown us how $type is assigned so we cannot tell.
HTH
Chris
Rw wrote:
This is a continue from this morning (thanks so much for the responses)..
yielding a data type mismatch:
$CheckArr =
4 matches
Mail list logo