function DB_fetch_array($query) { return mysqli_fetch_array($query); } // When I call this, I get the following warning (which I consider an error): "PHP Warning: mysqli_fetch_array() expects parameter 1 to be mysqli_result, boolean given". I call it with: $query = DB_query('SELECT * FROM test'); // DB_query() is exactly like the function I show here but with mysqli_query(). $i = $DB_fetch_array($query);