Continue using data inserted into the codeigniter database

0

I tell you that I am working on CodeIgniter I am doing only one function, the first thing I do is insert:

$data = array(
  'id' => $this->input->post('id'),
  'opcion' => $this->input->post('opcion'),
  );

I wonder how I get the var option to be able to continue using it in the php?

$ option

    
asked by Hernan Humaña 22.12.2016 в 22:55
source

1 answer

2

First of all that is apart from the framework, you are having problems with the basics of PHP, in this case you should understand a little better the management and use of arrangements

Answering your question, it is only a question of accessing the arrangement by its index, for example:

$data = array(
  'id' => $this->input->post('id'),
  'opcion' => $this->input->post('opcion'),
  );

echo $data['opcion'];

I recommend you check the basics of the language.

    
answered by 22.12.2016 / 23:06
source