I want to save the array from view to database but I can't get the array from view.
in view page
<?php
$nilai = array(
array(1,2,3,4),
array(a,b,c,d)
);
<a href="<?= BASEURL; ?>/penerima/tambah?nilai=$nilai" class="btn btn-l btn-info">simpan</a>
in controller page
<?php
class Penerima extends Controller
{
public function index()
{
$data['penerima'] = $this->model('Penerima_model')->getAll();
$this->view('templates/header');
$this->view('penerima/index', $data);
$this->view('templates/footer');
}
public function tambah() and I'm using MVC concept
{
$nilai = $_GET['nilai'];
$this->model('Penerima_model')->tambahData($nilai);
}
}
I have two-dimensional array.
How can I resolve this problem?