数组格式 - >
Array([0] => Array(
[qus] => 1
[y_n] => 0
[range_a] => 0
[desc] =>
[range_b] =>
[highRiskComm] =>
));
控制器 - >
foreach($sup_qus as $riskData){
if($riskData['range_a']==10){
// enter code here
}
}
Php错误:
严重性:通知消息:未定义索引:range_a
我该如何解决这个问题?
答案 0 :(得分:-1)
这是一个多维数组。
MyAdapter myAdapter = new MyAdapter(getSupportFragmentManager(), fragmentList, titleList);
ViewPager viewPager = (ViewPager) findViewById(R.id.viewPager);
TabLayout tabLayout= (TabLayout) findViewById(R.id.tabs);
viewPager.setAdapter(myAdapter);
tabLayout.setupWithViewPager(viewPager);
查看您发布的数组格式
数组 [0] => ...