Gossamer Forum
Home : Products : Gossamer Links : PHP Front End :

Getting object values into an array?

Quote Reply
Getting object values into an array?
Hi!

Can anyone tell me how to turn all values of a class object into an array that can be used for an insert?

So for example my object has set values for..

$this->firstname = 'firstname';
$this->middlename = 'middlename';
$this->lastname = 'lastname';

etc etc etc...

What I want to do is pass that information into an insert statement something like this...

$DB->insert('table',$object);

while still inside the class. Everything I've tried throws back errors.

Can anyone help?

regan.
Subject Author Views Date
Thread Getting object values into an array? ryel01 6089 Nov 4, 2005, 1:11 PM
Post Re: [ryel01] Getting object values into an array?
Hargreaves 5950 Nov 4, 2005, 1:23 PM