Код: Выделить всё
Array
(
[0] => 1
[1] => 3
[2] => 4
)
Код: Выделить всё
$toppings = $this->input->get('topping');
foreach ($toppings as $topping ) {
$id = $topping;
$toppinglist = $this->toppingmodel->find_topping($id);
echo'
'; print_r($toppinglist); die();
}
Код: Выделить всё
function find_topping($id)
{
$query = $this->db->get_where('Topping', array('id' => $id));
return $query->row_array(); }
}
Код: Выделить всё
Array
(
[id] => 1
[slug] => mushroom
[toppingName] => Mushrooms
[price] => 50.00
)
Спасибо.
Подробнее здесь: https://stackoverflow.com/questions/646 ... odeigniter
Мобильная версия