Yes you can, but why don't you do it with one boolean variable:
$anyFalseResults = false; ... your query loop { // do the query if( $queryResult == false ) $anyFalseResults = true; }
at the end of the loop, $ anyFalseResults will contain what you are looking for.
source share