[eluser]khagendra[/eluser]
Here is an example for fetching the array values form view. Hope this will help you and you will be understand easily.
-- The controller (example.php)--
Code:
class Example extends Controller {
function Example()
{
parent::Controller();
$this->load->helper('url');
}
function index()
{
$this->load->view('v_example');
}
function show()
{
foreach($_POST['name'] as $name)
{
echo $name.'<br>';
}
}
}
-- The view (v_example.php)--
Code:
<form action="<?=site_url('example/show')?>" method="post">
<input type="text" name="name[]" value="khagendra" />
<input type="text" name="name[]" value="khagendra shah" />
<input type="text" name="name[]" value="khagendra pd shah" />
<input type="submit" name="submit" value="Submit" />
</form>