which is more suitable ?

edited July 2011 in Modules
$this->load->module_model(MODULE_FOLDER,'recipes_model');
vs
$CI =& get_instance();
$CI->load->module_model(MODULE_FOLDER,'recipes_model');

it seem like both are working, any recommend which one is more suitable during module development ?

Comments

  • edited 4:34PM
    I tend to use $CI but that was because I originally didn't realize the other way was possible way back when. Either should work though and the other way is actually cleaner.
  • edited 4:34PM
    will do thanks.
Sign In or Register to comment.