When I run this code, it works, but it gives me NOTICE 'Undefined offset 1'. Can someone tell me how can I fix this? $this->_data is a multidimensional array.
foreach ($this->_data as $key => $values) {
$this->_param[] = explode(",", $values[1]);
}
You need to check if there is any data in $values[1]
Use this:
foreach ($this->_data as $key => $values) {
if (isset($values[1]){
$this->_param[] = explode(",", $values[1]);
}
}