In a library/controller, another library can be loaded by using
$this->CI->load->library("LIB_NAME");
inside the constructor of that particular library/controller. However, a helper doesn’t have a class and thus, a constructor.
So, how can I load a library in a helper?
Also, provide any alternative, if any, for the same.
To load a library inside a helper you need to get a CI instance:
File helper.php: