while (!$XtremeD->EOF()) {
echo $XtremeD->DisplayInfo("Name");
echo $XtremeD->DisplayInfo("Quantity");
$XtremeD->MoveNext();
}
$XtremeD->MoveFirst();
I took tons out of there, but that part works....I just wanted to show that I'm using a "while" loop to get things out of the database.
My problem is, I want to take the results of the "while" loop and put it into one variable.
I cannot figure out how to do that.
I tried putting the loop in a fuction and calling it within a variable like this:
function cookie_order(){
while (!$XtremeD->EOF()){
echo $XtremeD->DisplayInfo("Name");
echo $XtremeD->DisplayInfo("Quantity");
$XtremeD->MoveNext();
}
}
$cookies = cookie_order();
(and that is the exact code I'm using), but it didn't work - it returned a "Call to a member function on a non-object".
I'm basically at a loss. Any ideas?

New Topic/Question
Reply




MultiQuote



|