send an array from view to controller in codeigniter -


i want send array using variable view controller, can use data database according array! example, in view have variable different equations like:

$data = 'setter'; 

and somewhere else:

$data = 'libero'; 

then in controller have code like:

if($query = $this->players_model->get_players(array('player_position' => $data, 'limit' => 3))) { $data['players'] = $query; } 

what should work?!

first advise , whatever trying achieve, "pass array view controller" wrong , mvc pattern not standing passing data view controller.

then, i'l this:

//in view $data = json_encode($myarray);  //in controller  $array = json_decode($data); 

Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -