CodeIgniter Forums
Clearing a config item - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20)
+--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21)
+--- Thread: Clearing a config item (/showthread.php?tid=30078)



Clearing a config item - El Forum - 05-02-2010

[eluser]Jacob Krustchinsky[/eluser]
Hello everyone,

I am using a config file to store all the settings of a site running off of my CMS. Now my question to you is, what is the quickest and most efficient way of setting a config item to blank from a controller. I want to be able to clear the item and then set the item again, maybe my brain is somewhere else right now but I am having difficulty doing that.

Thank you,

Jacob Krustchinsky


Clearing a config item - El Forum - 05-02-2010

[eluser]pickupman[/eluser]
User guide is your friend.

If you would like to dynamically set a config item or change an existing one, you can so using:
Code:
$this->config->set_item('item_name', 'item_value');



Clearing a config item - El Forum - 05-02-2010

[eluser]Jacob Krustchinsky[/eluser]
I have read through the user guide as if it were a bible. I tried doing this, yet it hasn't worked for me...I'll look back through my code to make sure no errors were made. Thank you for the response..