I want to create a link break (or if in a table create a new row) after x amount of records.
I would be using a while loop like:
$sql = "SELECT * FROM blah";
$query = mysql_query($sql);
while($result = mysql_fetch_assoc($query)){
echo $result['name'];
//After every 3rd record create a new line
}
New line after x amount of records(Solved)
Moderator: General Moderators
Re: New line after x amount of records(Solved)
I got it thanks I did
$count = 0;
while(blah blah){
if($count == 2){
echo "<br />";
$count = 0;
}
blah blah
}
It works :p thanks all.
$count = 0;
while(blah blah){
if($count == 2){
echo "<br />";
$count = 0;
}
blah blah
}
It works :p thanks all.