|
我用ci 2.02的这个怎么后台数据循环不出来也?前台:
<?php echo "欢迎来到php!"?>
<?php
if (isset($rows)){
foreach ($rows as $item):?>
<?php echo $item?>
<?php endforeach;}?>
controller:
class UserService extends Controller{
function UserService()
{
parent::Controller();
}
function index(){
$data['rows']=array('meng','zhang','wang');
$this->load->view('user_view',$data);
}
}
|
|