While Loop - how to break in groups of 10
Posted: Wed Jul 12, 2006 9:05 am
Pimptastic | Please use
What I'd like to end up with is 10 addresses in a list then a space (line break), 10 more and a space...
All help appreciated...
thanks.mc
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]
I have table full of addresses and want to break them into groups of 10 addresses each...
don't know how to write the loop...
all I've got so far is:Code: Select all
$query="SELECT 'address' FROM customers";
$result=mysql_query($query);
$num=mysql_numrows($result);
$i=0;
while ($i < $num) {
echo "$address <br>";
$i++;
}All help appreciated...
thanks.mc
Pimptastic | Please use
Code: Select all
,Code: Select all
and [syntax="..."] tags where appropriate when posting code. Your post has been edited to reflect how we'd like it posted. Please read: [url=http://forums.devnetwork.net/viewtopic.php?t=21171]Posting Code in the Forums[/url] to learn how to do it too.[/color]