【发布时间】:2018-07-04 11:48:04
【问题描述】:
我想创建一个下拉菜单,其中包含来自杂货店杂货数据库的修改后的列数据。我的代码如下
$this->db->select($column);
$temp = $this->db->get($table);
$temp1 = array();
foreach ($temp as $row)
{
$temp1[] = $row[$column];
}
但是这段代码不起作用。我收到错误undefined index $column 错误。我在哪里犯错?我不能使用杂货杂货set_relation api,因为我需要在将数据库列数据传递到下拉列表之前对其进行修改。
【问题讨论】:
标签: php grocery-crud