Forum Moderators: coopster
function get_data_for_blahblah(){
$db = new mysqli ('localhost', 'blahblah', 'blahblah', 'blahblah',3360,'blahblah');
$sqlstatement = "SELECT * from stuff";
$result1 = $db->query($sqlstatement);
$resultarray = $db->store_result();
return $resultarray;
}
$resultarray is not an array, it is a mysqli result variable. You may have a problem with variable scope here if you are returning the result. Play around with it a bit; it may come down to pushing the results into an actual array before returning.