Array Losing value

From: Date: Tue, 20 Jul 2004 02:28:52 +0000
Subject: Array Losing value
Groups: php.general 
Request: Send a blank email to php-general+get-191105@lists.php.net to get a copy of this message
I have a class called DBI which handles all of my database calls. One method called Fetch_Array simply has return mysql_fetch_assoc($resultID) It's losing it's value when I try to pass the val to another var example class BaseItem { function getBaseItems() { return $objDBI->Fetch_Array($objDBI->getResultID()); } } on my page I want to be able to do this while($rows=$objBaseItem->getBaseItems()) { output HTML; } if I die(sizeof($objDBI->Fetch_Array($objDBI->getResultID()))) within the DBI method, it return the correct value, however if I do $retval = $objDBI->Fetch_Array($objDBI->getResultID()); die(sizeof($retVal)); it returns 0. why does it lose it's value? What can I do to retain the value.

« previous php.general (#191105) next »