I have array of array and I did a print_r of it and it returned this...
Array (
[0] => Array
(
[0] => Array
(
[cust_id] => xl
[project_id] => central
[tot_ticket] => 1
[person] => [email protected] )
[1] => Array
(
[cust_id] => tsel
[project_id] => jabo1
[tot_ticket] => 1
[person] => [email protected] )
[2] => Array
(
[cust_id] => isat
[project_id] => jabo2
[tot_ticket] => 1
[person] => [email protected] ) ) )
I write this in my controller right now:
for ($i=0; $i<count($customerField); $i++) {
for ($j=0; $j<count($activityField); $j++) {
for ($k=0; $k<count($userIdField); $k++) {
array_push($data, $this->queries_trend->fetch_ajax($customerField[$i], $activityField[$j], $userIdField[$k]));
foreach ($data as $value) {
$test .= '
<tr>
<td>' . $value[$i][$j]['cust_id']->cust_id . '</td>
<td>' . $value[$i][$j]['project_id'] ->project_id. '</td>
<td>' . $value[$i][$j]['tot_ticket']->tot_ticket . '</td>
<td>' . $value[$i][$j]['person']->person . '</td>
</tr>';
}
}
}
}
I have problem to get the value of each array, anyone here can help me to find the solution?