值我在我的控制器下面一行:越来越阵列关键的笨
$data['faq'] = $this->faqModel->get();
此数据印刷使用的print_r
Array
(
[faq] => Array
(
[0] => Array
(
[faqid] => 12
[catid] => 122
[question] => How this CMS works
[question_en] => How this CMS works
[answer] => How this CMS works?
[answer_en] => How this CMS works?
[sorder] => 2
[visible] => 1
)
[1] => Array
(
[faqid] => 8
[catid] => 121
[question] => How does the design cost?
[question_en] => How does the design cost?
[answer] => How does the design cost?
[answer_en] => How does the design cost?
[sorder] => 1
[visible] => 1
)
)
)
我想使用存储在值以下[catid]键,我试图做这样的事情: $ data ['faq'] ['catid']在控制器中获取该值(我想再次使用该值进行选择)但是我得到与此错误消息:未定义的索引:catid
任何人都可以帮助我获得['catid']的价值?
问候,卓然
你缺少前CATID $数据指数[ '常见问题解答'] [0] [ 'CATID'] – arma 2012-03-19 10:11:04
感谢ARMA,它现在的作品。 – Zoran 2012-03-19 10:26:26