I am new to codeigniter.
when need to display 5th element value of an array in java normally we use,
System.out.print(array[4]);
in controller of codeigniter I use,
$data['test'] = $this->Model_test->getValues();
to assign value into the array. and then I use,
$this->load->view('test_view', $data);
to load view.
inside view I use,
foreach ($questions as $object) {
echo $object->question;
}
to display all values. If I need to display only the value of 5th element, what should I do?
$questions[5]for array of object$questions->5