inclub ‘数据库地址’;
<?php
//查询数据库,引入假数据
include 'data_lol_list.php';
//读取数据
/*
$heroArr =array(
array(
"champion_icon"=> "images/1498811286269.jpg",
"champion_name"=>"凯隐",
),
*/
echo '<ul>';
for ($i=0; $i < count($heroArr); $i++) {
//html
echo '<li>';
echo '<img src="'.$heroArr[$i]['champion_icon'].'" alt="" />';
echo '<a href="#">'.$heroArr[$i]['champion_name'].'</a>';
echo '</li>';
}
echo '</ul>';
?>