$result = $class->method(); //returns an array of associative arrays
if($result==TRU E) $cat=$result[0]['element1'];
I've been converting a class from an original and the original class
*apparently* returned an array that could be boolean tested. My conversion
seems to have lost this ability.
if($result)
seems to be testing for non-NULL which gets me what I need, but I don't
want to change these lines in the program. I *can* change the class coding.
Is there something I can add to what the class method returns (the array)
that answers straightaway as a boolean?
--
Remove INVALID from e-mail address.
Brian Smither
Smither Consulting
if($result==TRU E) $cat=$result[0]['element1'];
I've been converting a class from an original and the original class
*apparently* returned an array that could be boolean tested. My conversion
seems to have lost this ability.
if($result)
seems to be testing for non-NULL which gets me what I need, but I don't
want to change these lines in the program. I *can* change the class coding.
Is there something I can add to what the class method returns (the array)
that answers straightaway as a boolean?
--
Remove INVALID from e-mail address.
Brian Smither
Smither Consulting
Comment