\echo r>
\if (mysqli_num_rows($result) > 0) {
while($row = mysqli_fetch_assoc($result)) {
echo r>
\ }
} else {
echo r>
\}
echo able>\//关闭连接
mysqli_close($conn);
?>
table {
border-collapse: collapse;
margin: auto;
width: 50%;
}
table th {
background-color: #4CAF50;
color: white;
text-align: center;
padding: 8px;
}
table td {
border: 1px solid #ddd;
text-align: center;
padding: 8px;
}
table tr:nth-child(even){background-color: #f2f2f2;}
table tr:hover {background-color: #ddd;}
文章来自互联网,不代表电脑知识网立场。发布者:电脑知识网,转载请注明出处:https://www.pcxun.com/n/261928.html