08-31-2014, 09:10 PM
[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
I have these codes below but does not get the key and value.
Any suggestions please.
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'))) {
$data['some_key'] = $this->input->post('some_key');
} else {
// On view would display "content of value" selected from database.
$data['some_key'] = $this->item->get('some_key');
}
I have these codes below but does not get the key and value.
Code:
private $data = array();
function __construct() {
$this->CI =& get_instance();
}
public function get($key) {
return (isset($this->CI->data[$key]) ? $this->CI->data[$key] : null);
}
public function set($key, $value) {
$this->CI->data[$key] = $value;
}
public function has($key) {
return isset($this->CI->data[$key]);
}
Any suggestions please.