'.$row['createtime'],'调用出的是时间戳,怎么才能让显示成日期
'.$row['xingbie'],' 调用出的性别是1,2. 怎么让显示成1=男 2=女
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="get">
<input type="text" name="keyword">
<button>搜索</button>
</form>
<?php
// $min = 0;
$maxs = 10000;
$sizePage = 10;
$currentPage = 1;
$keyWord = $_GET['keyword'];
echo "<h1>".$keyWord."</h1>";
// 创建连接
$conn = new mysqli('localhost','test','123456','test');
if(!$conn){
echo '连接失败', mysqli_connect_error(), "<br/>";
}
else{
echo '连接成功', "<br />";
}
$res = mysqli_query($conn, 'select * from aa where (name like "%'.$keyWord.'%") and wid = 46 ');
echo '查询到的记录条数:',mysqli_num_rows($res);
echo '
<table border="1">
<th>排序</th>
<th>姓名</th>
<th>添加时间</th>
<th>性别</th>
';
$i = 1;
while($row = mysqli_fetch_array($res)){
echo '
<tr>
<td>'. $i .'</td>
<td>'.$row['name'],'</td>
<td>'.$row['createtime'],'</td>
<td>'.$row['xingbie'],'</td>
</tr>
';
$i++;
}
echo '</table>';
mysqli_close($conn);
?>
</body>
</html>