954,180 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Cast Object to Array in object construct

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.

chocopaste
Newbie Poster
1 post since Sep 2010
Reputation Points: 10
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You