I have got this little snippet of code, I want to be able to define each array element as a new data member.
class Core_User { protected $data_members = array( 'id' => '%d', 'email' => '"%s"', 'password' => '"%s"', 'title' => '"%s"', 'first_name' => '"%s"', 'last_name' => '"%s"', 'time_added' => '%d' , 'time_modified' => '%d' , ); function __construct($id = 0, $data = NULL) { foreach($this->data_members as $member){ //protected new data member } }