query($sql); $i=1; while($row=$res->fetch_row()){ echo ''; echo ''.$i.''; foreach($row as $k=>$v){ echo ''.$v.''; } echo ""; $i++; echo "/> query($sql); $i=1; while($row=$res->fetch_row()){ echo ''; echo ''.$i.''; foreach($row as $k=>$v){ echo ''.$v.''; } echo ""; $i++; echo ">

Home  >  Article  >  Backend Development  >  select-php表格循环输出后在最后一行求和

select-php表格循环输出后在最后一行求和

WBOY
WBOYOriginal
2016-06-02 11:28:14982browse

selectphpsql

$sql="select * from acces";

$res=$mysqli->query($sql);
$i=1;
while($row=$res->fetch_row()){
echo ''

;
echo ''.$i.'';
foreach($row as $k=>$v){
echo ''.$v.'';
}
echo "";
$i++;
echo '';
}
我想在这个代码基础上输出的表格最后一行求和
图片说明
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn