Codeigniter config set and get variable

Today, We want to share with you Codeigniter config set and get variable.In this post we will show you codeigniter load config in library,, hear for codeigniter config production we will give you demo and example for implement.In this post, we will learn about codeigniter set config variable in controller with an example.

Codeigniter config set and get variable

I shall simple use Codeigniter “$this->config” variable for all the data setting set configuration item main value. as well as I shall use this “set_item()” and “item()” functions for very easy way to Codeigniter set and get value of array key.

Now, let’s basic and simple demo for Codeigniter config file item new value.

READ :  Angular Dynamic Autocomplete Textbox

Set Config Value using Codeigniter:

$this->config->set_item('liveMyURL','infinityknow.com');

Get Config Value using Codeigniter:

$liveMyURL = $this->config->item('liveMyURL');

Codeigniter Example of Config Value::

$this->config->set_item('liveMyURL','infinityknow.com');
$liveMyURL = $this->config->item('liveMyURL');
print_r($liveMyURL);
exit;

jQuery 15 Powerful Tips and Tricks for Developers and Web Designer

Read :

Summary

You can also read about AngularJS, ASP.NET, VueJs, PHP.

I hope you get an idea about How to set and get config item value in Codeigniter?.
I would like to have feedback on my Infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.

Add a Comment

Your email address will not be published. Required fields are marked *