I'm not sure as to why strpos does what it does here, at least its not
immediately obvious, but, a solution to this would be to use a regular
expression search, it would be more exact, it has never failed me, and it will
be faster; I recall reading that preg functions were faster at then str one
On 16 March 2011 00:25, Jack wrote:
>> Here you're trying to access it as an array, which it's not, so the
> 'response'
>> key doesn't exist. In addition, you're looking for UPPER-CASE, whereas
> that's
>> not the case in your example variable.
>> Finally, you're checking to make sure that th
> Here you're trying to access it as an array, which it's not, so the
'response'
> key doesn't exist. In addition, you're looking for UPPER-CASE, whereas
that's
> not the case in your example variable.
> Finally, you're checking to make sure that the string IS INDEED found, but
> then printing
On 16/03/2011, at 10:34 AM, Jack wrote:
> Hello All,
>
>
>
> I got some help on this yesterday, but somehow it's not consistant
>
>
>
>
>
>
> $results = "3434approd34";
>
>
>
> if(strpos($results['response'], 'APPROVED') !== false) {
>
>
>
> print "declined";
>
>
>
> } else {
On Tue, Mar 15, 2011 at 17:34, Jack wrote:
> Hello All,
>
>
>
> I got some help on this yesterday, but somehow it's not consistant
>
>
>
> $results = "3434approd34";
Here you're defining the variable as a string.
> if(strpos($results['response'], 'APPROVED') !== false) {
Here you're tr
5 matches
Mail list logo