【发布时间】:2023-04-10 01:06:02
【问题描述】:
我使用此代码将一些数据存储到数组中
$this->data['result'] = $this->mymodel->search($keyword);
当我使用print_r($this->data);打印我的结果时
它是这样显示的
Array ( [base_url] => http://localhost/pelikanartline.com/ [result] => Array ( [0] => stdClass Object ( [product_id] => 2 [product_code] => 167007 [product_name] => ARTLINE VIVIX HIGHLIGHTERS 10PK YELLOW [product_discription] => some description [xylene_free] => y [rohs_compliant] => y [product_features] => some text ) ) )
现在我想将 product_id 值存储到 pro_id 之类的变量中。请帮我这样做。
【问题讨论】:
标签: php mysql arrays codeigniter