这是我的PHP代码: -
Array
(
[cus] => Anand Roy
[depart] => science>
[add1] => sdfrfrferwfrfrfeferv
[add2] => veververv eververv
[cty] => Jalpaiguri
[pin] => 735101
[st] => West Bengal
[em] => cosmilisation@gmail.com
[tele] => 919641758183
[fax] =>
[admin] => uh
[aphn] => 919641758183
[bill] => khkj
[bphn] => 919641758183
[key] => khkj
[kphn] => 919641758183
[am] => 1 am
[pm] => 1 pm
[week] =>
)
我无法在视图中显示他们的数据....
答案 0 :(得分:0)
$data['myarray']=Array
(
[cus] => Anand Roy
[depart] => science
[add1] => sdfrfrferwfrfrfeferv
[add2] => veververv eververv
[cty] => Jalpaiguri
[pin] => 735101
[st] => West Bengal
[em] => cosmilisation@gmail.com
[tele] => 919641758183
[fax] =>
[admin] => uh
[aphn] => 919641758183
[bill] => khkj
[bphn] => 919641758183
[key] => khkj
[kphn] => 919641758183
[am] => 1 am
[pm] => 1 pm
[week] =>
); // initialize your array
$this->load->view("viewfile",$data); // pass the array to your view page
在您的viewfile中,访问它:
foreach($myarray as $array) // foreach array elements
{
echo $array['cus']; // echo it based on array index
}