[eluser]WillKemp[/eluser]
[quote author="jhabbley" date="1238722112"]you do know what foo is when you load the library.
Code:
$this->load->library('email');
$data = array('email_object' => $this->email);
$this->parser->parse('someview', $data);
"$this->email" is the object instance of the email library that you loaded.[/quote]
Yeah, of course. Sorry, i was getting confused there. I need to have several instances of the object at the same time, so i'd need to use the third parameter to $this->load->library() to give each object a different name. It's that name i don't know.
e.g.,
Code:
include( 'Aliasformfield.php' );
$aliasObjs = array();
$aliases = $this->dbfetch->aliases( $id );
$i = 0;
foreach ( $aliases as $alias )
{
$params = array(
'id' => $alias->aliasId
, 'forename' => $alias->forename
, 'surname' => $alias->surname
);
$aliasObjs[$i] = new aliasformfield( $params );
$i++;
}
How can i do that using $this->load->library() instead of 'new'?