Can I send my attributes to the model __construct - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Can I send my attributes to the model __construct (/showthread.php?tid=11256) |
Can I send my attributes to the model __construct - El Forum - 09-01-2008 [eluser]fuksito[/eluser] Can I get several instanses of one model class, how it is possible to pass different data to it`s constructor. Can I send my attributes to the model __construct - El Forum - 09-01-2008 [eluser]Colin Williams[/eluser] Load the model: Code: $this->load->model('blog_model'); Then create new instances as you normally would with PHP: Code: $blog = new Blog_model($param, $param2); |