I was doing some research and found matching information to what you're saying and tried adjusting my code:
Code:
$query = $db->query_read("SELECT value, varname FROM ".TABLE_PREFIX."setting WHERE varname IN ('illegalusernames','minuserlength ','maxuserlength')");
$results = $db->fetch_array($query);
print_r($results);
The Above Outputs:
Array ( [value] => admin moderator op9 option9 option.9 forum vbulletin [varname] => illegalusernames )
I can't understand doing a loop/while/foreach if there isn't proper array data to loop through.
Strange enough, when executing this sql straight into phpmyadmin it returns all three rows. So I assume it must be something with how I am calling the db queries within vbulletin/php.
I have tried several variations of queries/fetches with no success.