943,170 Members | Top Members by Rank

Ad:
  • PHP Discussion Thread
  • Unsolved
  • Views: 25
  • PHP RSS
Sep 1st, 2010
0

Cast Object to Array in object construct

Expand Post »
This may be impossible, but I thought I'd give it a shot. I'm using PDO to fetch data from the DB, and use the PDO::FETCH_INTO approach to populate an existing Object (think ORM). What I'm wondering is if I can turn an object into an array of objects of the same type while still within the object construct. I tried making my object extend the ArrayObject class, which sort of work, but by doing that I lose all the properties I set in my own class.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
chocopaste is offline Offline
1 posts
since Sep 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in PHP Forum Timeline: $_FILES empty
Next Thread in PHP Forum Timeline: Zend PHP Studio vs Exclipse?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC