Articles → PHP CODEIGNITER → Helper functions in codeigniter

Helper functions in codeigniter






Purpose





Example










<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class users_list extends CI_Controller {
public function Index()
{

$this->load->helper('url');

$this->load->view('users');
}
}




<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html>
<html lang="en">
<head>

</head>
<body>

<div id="container">

<?php echo anchor('http://Gyansangrah.com', 'Gyansangrah');?>

</div>

</body>
</html>



Output


Picture showing the output of using URL library in codeigniter

Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Monday, July 20, 2020

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250