CodeIgniter Forums
fetch values not correctly? - Printable Version

+- CodeIgniter Forums (https://forum.codeigniter.com)
+-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5)
+--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24)
+--- Thread: fetch values not correctly? (/showthread.php?tid=72722)



fetch values not correctly? - kvanaraj - 01-31-2019

Code:
I want to store checkbox value,two textbox value in array.

public function valinsert()
{
$certids = $this->input->post('certid');  
$nocs = $this->input->post('noc1');   
$amtt = $this->input->post('txt');

$result = array();
  foreach ($certids as $index=>$certid) 
  {
     $result[] = $certid . '_' . $nocs[$index] .'_' . $amtt[$index];
  }

but it displays
Code:
Array
(
   [0] => 1_2_1700
   [1] => 2_3_900
   [2] => 3_0_0
   [3] => 4_0_0
   [4] => 5_3_900
   [5] => 6_3_900
   [6] => 7_3_900
)
how to display those checked checkbox with corresponding row details. some times its working but most of the time return "o". how to solve this


RE: fetch values not correctly? - InsiteFX - 01-31-2019

PHP list