Casting objects.

From: Date: Mon, 18 Jan 2010 15:04:53 +0000
Subject: Casting objects.
Groups: php.general 
Request: Send a blank email to php-general+get-301192@lists.php.net to get a copy of this message
Hello. I've got an object via odbc_fetch_object (which is of stdClass). I have an class structuresRemovalReason. I want to cast the response of odbc_fetch_object to structuresRemovalReason. The only way I can see of doing this is to not use odbc_fetch_object, but odbc_fetch_assoc and then iterate the array and populate a new structuresRemovalReason. Or an I missing a trick. I'm pretty sure I am. Regards, Richard Quadling. -- ----- Richard Quadling "Standing on the shoulders of some very clever giants!" EE : http://www.experts-exchange.com/M_248814.html Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 ZOPA : http://uk.zopa.com/member/RQuadling

« previous php.general (#301192) next »