[eluser]Shiju S S[/eluser]
I tried to pass the array data to contoller loadprddetails;
This code is from a view file.
Code:
<div>
<?php
for($i=1;$i<=10;$i++)
{
$data = array(
'prdid' => 'India',
'exeid' => 'United Arab Emirates',
);
?>
<div>
<p>
<a href="<?Php echo base_url() ?>frontpage/loadprddetails/<?Php echo $data ?>"><img src="<?Php echo base_url() ?>images/logo.jpg" align="left" /></a>
</p>
<?Php echo "quickbharat.com"; ?> <br />
<?Php echo "category"; ?>
</div>
<?Php } ?>
The route is
Code:
$route['frontpage/loadprddetails/(:any)'] = "frontpage/loadprddetails/$1";
The controller is
Code:
public function loadprddetails($prd)
{
$data['message'] = "Product id is".$prd['prdid']."Userid is ".$prd['exeid'];
$this->load->view('frontarea/header', $data);
$this->load->view('frontarea/success_messages', $data);
$this->load->view('frontarea/footer', $data);
}
As you know the output is just A
The first letter of Array
Que1:
Is it possible to pass an array to the controller. If so please help me
Que2:
How can I pass multiple values back to the controller