You can load library in codeigniter view or anywhere using this trick.
go to – system/helpers/url_helper.php
Add the following function :
function loadLibrary($libraryName)
{
$ci = & get_instance();
$ci->load->library->($libraryName);
return $ci->$libraryName;
}
Now in your view Or any where you want to load library just call this function :
example in sample_view.php we have to load library :
just call the function :
loadLibrary(‘library_name’);