Category : foreach

Im sending 2 datas with same name at the front side like this <h1>First Address</h1> <input name="address[1][street]" value="Hauptstr" /> <input name="address[1][city]" value="Berlin" /> <h2>Second Address</h2> <input name="address[2][street]" value="Wallstreet" /> <input name="address[2][city]" value="New York" /> and then im trying to store that value in my database throught my model methods in codeigniter 3 this is what ..

Read more

i want to loop all the data i call but that runs only one data I use Codeigniter framework Model: $this->db->where(‘group_user’, ‘upt_perpus’)->order_by(‘idmodul’, ‘DESC’)->get(‘menu’)->result_array(); Controller: $data = array( ‘about’ => array( ‘sejarah’ => ‘Sejarah’, ‘visi_misi’ => ‘Visi, Misi & Tujuan’, ‘struktur’ => ‘Struktur Organisasi’ ), ‘services’ => array(), ‘peraturan’ => array( ‘umum’ => ‘Umum’, ‘khusus’ => ..

Read more

Hope you are doing great! Please have an idea of ​​a comment grouped by 3, then the 4th to receive the value of the grouped in a month. This my dat below : $salaries = [ [ ‘month’=>’January’, ‘salary’=>200 ], [ ‘month’=>’Februray’, ‘salary’=>300 ], [ ‘month’=>’March’, ‘salary’=>400 ], [ ‘month’=>’April’, ‘salary’=>500 ], [ ‘month’=>’May’, ‘salary’=>600 ..

Read more