sending data from foreach which is in the view 'header' in the url using json encode but the value is not passing to the variable and showing empty value in the controller 'user' here is the code
'header'(view)
<?php foreach ($data as $key ):?>
<?php echo anchor('user/dashboard/?data='.json_encode($key) ,'Home'); ?><span class="sr-only">(current)</span></li>
now the controller 'user'
$data=json_decode($_GET['data']);
print_r($data);
$this->load->model('Pmodel');
$email['data']=$this->Pmodel->select_model($data);
$this->load->view('dashboard/dashboard',$email);
now when it goes to the controller it shows error
http://localhost/P_Display/user/dashboard/?data={
no value in the array