<html>
<head>
<title>index</title>
</head>

<body>
<!-- http://127.0.0.1:8000/CodeIgniter-3.0.0/index.php/user -->
<?php
	echo $title;
	
	//不推荐,代码难维护
	echo "<table border='1'>"; 
	foreach ( $list as $value ) {
		
		echo "<tr>";
		echo "<td>{$value['id']}</td>";
		echo "<td>{$value['name']}</td>";
		echo "</tr>";
	}
	echo "</table>"
?>
	
	<table border = "1">
		<tr>
			<td>编号</td>
			<td>姓名</td>
			<td>邮箱</td>
		</tr>
		<?php foreach ($list as $item):?>
		<tr>
			<td><?=$item["id"]?></td><!-- 短标签 CI可以直接支持,5.4以前没有开启的情况下ci会帮忙处理 -->
			<td><?=$item["name"]?></td>
			<td><?=$item["email"]?></td>
		</tr>
		<?php endforeach;?>
	</table>


</body>
</html>

