Re: 5 Records per line

From: Date: Mon, 11 Mar 2002 16:15:59 +0000
Subject: Re: 5 Records per line
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-88024@lists.php.net to get a copy of this message
> Basically what i want is, that on a results page, i > want that the records You mean fields > should be placed only 5 on one line. > For example, let's say i have 100 usernames in a table > in my database. > Now on one page, i want to display all these usernames. > But i want that in one line, there should be only 5 usernames, > seperates by spaces. Like this : > user1 user2 user3 user4 user5 > user6 user7 user8 user9 user10 Use a counter while looping through the results. When counter % 5 = 0, do whatever you need to create a new line. "\n", "</tr>", whatever. Chris

« previous php.general (#88024) next »