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.

READ :  How to check request is ajax or not in Laravel 6?

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

Set Config Value using Codeigniter:

[php]
$this->config->set_item(‘liveMyURL’,’infinityknow.com’);
[/php]

Get Config Value using Codeigniter:

[php]
$liveMyURL = $this->config->item(‘liveMyURL’);
[/php]

Codeigniter Example of Config Value::

[php]
$this->config->set_item(‘liveMyURL’,’infinityknow.com’);
$liveMyURL = $this->config->item(‘liveMyURL’);
print_r($liveMyURL);
exit;
[/php]

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.

READ :  Laravel 6 - increment or decrement column value example

Leave a Comment