//at Controllers
$array = null;
//insert element value to array
for ($x = 0; $x <= 10; $x++) {
$array[]= array('package_size'=>$x);
for ($y = 10; $y >= 0; $y--) {
$array[]= array('downline_list'=>$y);
}
}
$data['direct_sponsor_bonus_vals'] = $array;
$this->load->view('secure/direct_sponsor_bonus_settings', $data);
//at Views
print_r($direct_sponsor_bonus_vals)."<br/>";
Вывод:
[0] => Array ( [package_size] => 0)
[1] => Array ( [uplines_lists] => 10)
[3] => Array ( [package_size] => 1)
[4] => Array ( [uplines_lists] => 9)
Как сделать так, чтобы вывод стал как показано ниже?
[0] => Array ( [package_size] => 0, [uplines_lists] => 10)
[1] => Array ( [package_size] => 1, [uplines_lists] => 9)