RE: [PEAR] DataObject::toArray

From: Date: Tue, 27 May 2003 15:27:13 +0000
Subject: RE: [PEAR] DataObject::toArray
Groups: php.pear.general 
Request: Send a blank email to pear-general+get-5626@lists.php.net to get a copy of this message
> Let me guess... toArray() returns an array ? Yes, but it returns an array from the object. Only it seems to do so on predefined variables of the object, not when they are added dynamically. From the doc: SELECTADD <?php $person = new DataObjects_Person; $person->selectAdd(); $person->selectAdd('id,name'); while ($person->fetch()) { echo "$person->id} {$person->name}<BR>"; } $person = new DataObjects_Person; $person->selectAdd("DATE_FORMAT(birthday,'%d %m %Y') as birthday_formated "); $person->id = 12; $person->find(TRUE); echo "$person->name} {$person->birthday_formated}<BR>"; ?> TOARRAY ->toArray() -- Get an array of the current result Only the current result does not seem to include statement from the selectAdd. Arnaud.

« previous php.pear.general (#5626) next »