Ver Mensaje Individual
  #2 (permalink)  
Antiguo 21/01/2008, 15:32
Avatar de GatorV
GatorV
$this->role('moderador');
 
Fecha de Ingreso: mayo-2006
Ubicación: /home/ams/
Mensajes: 38.567
Antigüedad: 20 años, 5 meses
Puntos: 2135
Re: Cómo limitar carga de datos

Código PHP:
$limit = 10;
$count = 1;
foreach(
$noticia->fetch_array() as $row) {
    echo 
' 
    <li><a href="' 
. $row['url'] . '" target="_blank">' . trim($row['text']) . '</a></li>';
    
$count++;
    if( 
$count == $limit ) $break;
} 
Saludos.