
Enumerar registros mostrados en PHP
Publicado por Rafael (4 intervenciones) el 29/05/2018 23:45:07
Hola amigos, estoy nuevo en PHP y tengo una duda, estoy mostrando un listado de usuarios en PHP en una tabla, ahora quisiera que al final de la tabla me indique cuantos hay en ella.
Mi codigo actual es:
Gracias por su ayuda
Mi codigo actual es:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head><meta http-equiv="Content-Type" content="text/html; charset=gb18030">
<title>Listado de Usuarios</title>
<link rel="stylesheet" type="text/css" href="estilo.css">
</head>
<body>
<h1>Mostrando Usuarios desde Base de Datos</h1>
<table>
<tr>
<th>Nombres</th>
<th>Correo Electronico</th>
<th>Telefono</th>
<th>Pais</th><?php
for($i=1; $i<$lista_usuarios; $i++)
while($row=mysqli_fetch_array($ejecuta_sentencia))
{
echo"<tr>";
echo"<td>".$row['nombres']."</td>";
echo"<td>".$row['email']."</td>";
echo"<td>".$row['telefono']."</td>";
echo"<td>".$row['pais']."</td>";
echo"<td></td>";
echo"</tr>";
}
?>
<tr>
</table>
</body>
</html>
Gracias por su ayuda
Valora esta pregunta


0