RE: Display break every specific number

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$i = 1;
while ($row = mysql_fetch_array($data))
{
    echo sprintf("%03d ", $i);
    echo $row["your_data"]; //if any
    if($i % 4 == 0)
    {
        echo "<br />";
    }
    $i++;
}
 
 
Ahsan

  _____  

From: php-objects@xxxxxxxxxxxxxxx [mailto:php-objects@xxxxxxxxxxxxxxx] On
Behalf Of Sovichea SOU
Sent: 19 Maret 2010 15:06
To: php-objects@xxxxxxxxxxxxxxx
Subject:  Display break every specific number


  

Hi,

I want to display a break (<br>) every 4 numbers of records.
For example:
001 002 003 004<br>
005 006 007 008<br>
009 010 011 012<br>

How to do that?

Thanks.

[Non-text portions of this message have been removed]






[Non-text portions of this message have been removed]


[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Soap]     [Kernel Newbies]     [Yosemite]     [Yosemite Campsites]

  Powered by Linux