Code: Select all
class DisplayResults extends MySQLiResult{
function Generalization($ident,$query){
$wrap=array();
$result=array();
$temp="";
//initialise the first class
$dataB=new PMExtender($ident['server'], $ident['DataBase'], $ident['User'], $ident['pass']);
//QueryExec is a function that returns a MySQLi object
$result=$dataB->QueryExec($query);
while($temp=$dataB->fetch_assoc()){$wrap[]=$temp;}
}
}
The result is a array in an array.
Code: Select all
//an example of print_r($wrap);
wrap=[0=>Array[
"Title"=>"Test first query",
"Text"=>"Sample text for the tests involving this database"
]
1=>Array[
"Title"=>"Welcome to the site",
"Text"=>"This is my first post on these site..."
]
]
//I hope you got the idea
Any ideas?
My mistake: I didn' t put the exact name and order for the array. Thanks Kendal!