
07/06/2013, 16:09
|
| | Fecha de Ingreso: mayo-2008
Mensajes: 11
Antigüedad: 16 años, 8 meses Puntos: 0 | |
Error al recorrer un array Hola, al recorrer un array que lleva los valores de una consulta me da el siguiente error:
Notice: Undefined offset: 3 in C:\xampp\htdocs\proyecto\funciones.php on line 1168
Notice: Undefined offset: 4 in C:\xampp\htdocs\proyecto\funciones.php on line 1168
Notice: Undefined offset: 5 in C:\xampp\htdocs\proyecto\funciones.php on line 1168
Con el while me sale bien, pero quiero hacerlo con un for.¿Me podéis ayudar?
$rs = mysqli_query($con,$sentencia);
$row = mysqli_fetch_array($rs);
$tamano = count($row);
for ($i=0;$i<$tamano; $i++){
echo $row[$i]."<br/>";
} |