We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
关键是用foreach方法来渲染 视图 View:
<!DOCTYPE html> <html> <head> <title>hello</title> </head> <body> <ul> <?php foreach ($wsscat_list as $item):?> <li> <?php if(is_array($item)){ echo "我的第一个技能是".$item['first']."我的第二个技能是".$item['second']; } else{ echo "我的名字是".$item; };?> </li> <?php endforeach;?> </ul> </body> </html>
控制器 Controllers
<?php defined('BASEPATH') or exit('No direct script access allowed'); class Hello extends CI_Controller { public function index() { $data['wsscat_list'] = array( 'name' => 'Wsscat', 'Autumns', array('first' => 'JS', 'second' => 'PHP'), ); $this->load->view('hello', $data); } }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
关键是用foreach方法来渲染
视图 View:
控制器 Controllers
The text was updated successfully, but these errors were encountered: