![]() |
Suggestions Please For Library File - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: Suggestions Please For Library File (/showthread.php?tid=61024) |
Suggestions Please For Library File - El Forum - 08-31-2014 [eluser]riwakawd[/eluser] I would like to know what would be best way to be able to get my key column and my value column and have it so I could do something like key would be example: item_keywords value would be the content i.e. 'webdesign, movies' example Code: if (null !== ($this->input->post(some_key'))) { I have these codes below but does not get the key and value. Code: private $data = array(); Any suggestions please. Suggestions Please For Library File - El Forum - 08-31-2014 [eluser]Tim Brownlaw[/eluser] $this->input->post returns a value or FALSE...(Read the User guide to check the Return Values on things like this...) unless you are testing that elsewhere and setting it to null when it's False ie does not exist!!! Code: if ($this->input->post('some_key') !== FALSE) { Where/How is $data being populated... You refer to a database so I'm guessing you load this up from somewhere else using your set method or another you've not shown here. I am also guessing that this is your item library you are calling from the above code and that the private property that you have declared... $data is the one you are really wanting to refer to! Code: private $data = array(); |