>     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 that it was declined (!== false).  Instead, you may
> want:
> 
> <?php
> 
> $results['response'] = '3434approd34';
> 
> if (stripos($results['response'],'APPROVED') !== false) {
>     // It's been found
> } else {
>     // Oh, crap.
> }
> 
> ?>

maybe I should do this some other way because I'm getting false positives.

I was using if(strpos($results['response'], 'APPROVED') !== false) {
And its found if the value of $results = "3434APPROVED34" and it also is
found if its $results = "3434APPOVED34", so this may not be the best way to
accomplish this.


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to